diff --git a/k210.svd b/k210.svd
index 8b630ce..460876e 100644
--- a/k210.svd
+++ b/k210.svd
@@ -321,38 +321,13 @@
Input Value Register
0x000
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -360,38 +335,13 @@
Pin Input Enable Register
0x004
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -399,38 +349,13 @@
Pin Output Enable Register
0x008
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -438,38 +363,13 @@
Output Value Register
0x00C
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -477,38 +377,13 @@
Internal Pull-Up Enable Register
0x010
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -516,38 +391,13 @@
Drive Strength Register
0x014
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -555,38 +405,13 @@
Rise Interrupt Enable Register
0x018
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -594,38 +419,13 @@
Rise Interrupt Pending Register
0x01C
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -633,38 +433,13 @@
Fall Interrupt Enable Register
0x020
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -672,38 +447,13 @@
Fall Interrupt Pending Register
0x024
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -711,38 +461,13 @@
High Interrupt Enable Register
0x028
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -750,38 +475,13 @@
High Interrupt Pending Register
0x02C
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -789,38 +489,13 @@
Low Interrupt Enable Register
0x030
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -828,38 +503,13 @@
Low Interrupt Pending Register
0x034
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -867,38 +517,13 @@
HW I/O Function Enable Register
0x038
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -906,38 +531,13 @@
HW I/O Function Select Register
0x03C
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -945,38 +545,13 @@
Output XOR (invert) Register
0x040
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
- pin888
- pin999
- pin101010
- pin111111
- pin121212
- pin131313
- pin141414
- pin151515
- pin161616
- pin171717
- pin181818
- pin191919
- pin202020
- pin212121
- pin222222
- pin232323
- pin242424
- pin252525
- pin262626
- pin272727
- pin282828
- pin292929
- pin303030
- pin313131
+
+ pin%s
+ 0
+ 0
+ 32
+ 1
+
@@ -1509,189 +1084,54 @@
64
- ch1_en
- Enable channel 1
+ ch%s_en
+ Enable channel %s
[0:0]
-
-
- ch2_en
- Enable channel 2
- [1:1]
-
-
- ch3_en
- Enable channel 3
- [2:2]
-
-
- ch4_en
- Enable channel 4
- [3:3]
-
-
- ch5_en
- Enable channel 5
- [4:4]
-
-
- ch6_en
- Enable channel 6
- [5:5]
+ 6
+ 1
+ 1-6
- ch1_en_we
- Write enable channel 1
+ ch%s_en_we
+ Write enable channel %s
[8:8]
-
-
- ch2_en_we
- Write enable channel 2
- [9:9]
-
-
- ch3_en_we
- Write enable channel 3
- [10:10]
-
-
- ch4_en_we
- Write enable channel 4
- [11:11]
-
-
- ch5_en_we
- Write enable channel 5
- [12:12]
-
-
- ch6_en_we
- Write enable channel 6
- [13:13]
+ 6
+ 1
+ 1-6
- ch1_susp
- Suspend request channel 1
+ ch%s_susp
+ Suspend request channel %s
[16:16]
-
-
- ch2_susp
- Suspend request channel 2
- [17:17]
-
-
- ch3_susp
- Suspend request channel 3
- [18:18]
-
-
- ch4_susp
- Suspend request channel 4
- [19:19]
-
-
- ch5_susp
- Suspend request channel 5
- [20:20]
-
-
- ch6_susp
- Suspend request channel 6
- [21:21]
+ 6
+ 1
+ 1-6
- ch1_susp_we
- Enable write to ch1_susp bit
+ ch%s_susp_we
+ Enable write to ch%s_susp bit
[24:24]
-
-
- ch2_susp_we
- Enable write to ch2_susp bit
- [25:25]
-
-
- ch3_susp_we
- Enable write to ch3_susp bit
- [26:26]
-
-
- ch4_susp_we
- Enable write to ch4_susp bit
- [27:27]
-
-
- ch5_susp_we
- Enable write to ch5_susp bit
- [28:28]
-
-
- ch6_susp_we
- Enable write to ch6_susp bit
- [29:29]
+ 6
+ 1
+ 1-6
- ch1_abort
- Abort request channel 1
+ ch%s_abort
+ Abort request channel %s
[32:32]
-
- ch2_abort
- Abort request channel 2
- [33:33]
-
-
- ch3_abort
- Abort request channel 3
- [34:34]
-
-
- ch4_abort
- Abort request channel 4
- [35:35]
-
-
- ch5_abort
- Abort request channel 5
- [36:36]
-
-
- ch6_abort
- Abort request channel 6
- [37:37]
-
- ch1_abort_we
- Enable write to ch1_abort bit
+ ch%s_abort_we
+ Enable write to ch%s_abort bit
[40:40]
-
-
- ch2_abort_we
- Enable write to ch2_abort bit
- [41:41]
-
-
- ch3_abort_we
- Enable write to ch3_abort bit
- [42:42]
-
-
- ch4_abort_we
- Enable write to ch4_abort bit
- [43:43]
-
-
- ch5_abort_we
- Enable write to ch5_abort bit
- [44:44]
-
-
- ch6_abort_we
- Enable write to ch6_abort bit
- [45:45]
+ 6
+ 1
+ 1-6
@@ -1704,34 +1144,12 @@
64
- ch1_intstat
- Channel 1 interrupt bit
+ ch%s_intstat
+ Channel %s interrupt bit
[0:0]
-
-
- ch2_intstat
- Channel 2 interrupt bit
- [1:1]
-
-
- ch3_intstat
- Channel 3 interrupt bit
- [2:2]
-
-
- ch4_intstat
- Channel 4 interrupt bit
- [3:3]
-
-
- ch5_intstat
- Channel 5 interrupt bit
- [4:4]
-
-
- ch6_intstat
- Channel 6 interrupt bit
- [5:5]
+ 6
+ 1
+ 1-6
@@ -2799,14 +2217,13 @@
Data (output) registers
0x00
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
+
+ pin%s
+ 0
+ 0
+ 8
+ 1
+
@@ -2815,9 +2232,11 @@
0x04
- pin0
+ pin%s
0
0
+ 8
+ 1
DIRECTION
@@ -2832,13 +2251,6 @@
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
@@ -2891,14 +2303,13 @@
External port (data input) registers
0x50
- pin000
- pin111
- pin222
- pin333
- pin444
- pin555
- pin666
- pin777
+
+ pin%s
+ 0
+ 0
+ 8
+ 1
+
@@ -4617,29 +4028,13 @@
0x04
- rd_idx0
- rd_idx0
+ rd_idx%s
+ rd_idx%s
[5:0]
+ 4
+ 8
-
- rd_idx1
- rd_idx1
- [13:8]
-
-
-
- rd_idx2
- rd_idx2
- [21:16]
-
-
-
- rd_idx3
- rd_idx3
- [29:24]
-
-
diff --git a/src/lib.rs b/src/lib.rs
index 1e8bae9..d6ca91c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,7 +1,25 @@
-#![doc = "Peripheral access API for K210 microcontrollers (generated using svd2rust v0.16.1)\n\nYou can find an overview of the API [here].\n\n[here]: https://docs.rs/svd2rust/0.16.1/svd2rust/#peripheral-api"]
+#![doc = "Peripheral access API for K210 microcontrollers (generated using svd2rust v0.17.0)\n\nYou can find an overview of the API [here].\n\n[here]: https://docs.rs/svd2rust/0.17.0/svd2rust/#peripheral-api"]
+#![deny(const_err)]
+#![deny(dead_code)]
+#![deny(improper_ctypes)]
+#![deny(legacy_directory_ownership)]
#![deny(missing_docs)]
-#![deny(warnings)]
+#![deny(no_mangle_generic_items)]
+#![deny(non_shorthand_field_patterns)]
+#![deny(overflowing_literals)]
+#![deny(path_statements)]
+#![deny(patterns_in_fns_without_body)]
+#![deny(plugin_as_library)]
+#![deny(private_in_public)]
+#![deny(safe_extern_statics)]
+#![deny(unconditional_recursion)]
+#![deny(unions_with_drop_fields)]
+#![deny(unused_allocation)]
+#![deny(unused_comparisons)]
+#![deny(unused_parens)]
+#![deny(while_true)]
#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
#![no_std]
extern crate bare_metal;
extern crate riscv;
@@ -14,208 +32,143 @@ use core::ops::Deref;
pub mod interrupt {
#[doc = r"Enumeration of all the interrupts"]
#[derive(Copy, Clone, Debug)]
+ #[repr(u8)]
pub enum Interrupt {
#[doc = "1 - SPI0"]
- SPI0,
+ SPI0 = 1,
#[doc = "2 - SPI1"]
- SPI1,
+ SPI1 = 2,
#[doc = "3 - SPI_SLAVE"]
- SPI_SLAVE,
+ SPI_SLAVE = 3,
#[doc = "4 - SPI3"]
- SPI3,
+ SPI3 = 4,
#[doc = "5 - I2S0"]
- I2S0,
+ I2S0 = 5,
#[doc = "6 - I2S1"]
- I2S1,
+ I2S1 = 6,
#[doc = "7 - I2S2"]
- I2S2,
+ I2S2 = 7,
#[doc = "8 - I2C0"]
- I2C0,
+ I2C0 = 8,
#[doc = "9 - I2C1"]
- I2C1,
+ I2C1 = 9,
#[doc = "10 - I2C2"]
- I2C2,
+ I2C2 = 10,
#[doc = "11 - UART1"]
- UART1,
+ UART1 = 11,
#[doc = "12 - UART2"]
- UART2,
+ UART2 = 12,
#[doc = "13 - UART3"]
- UART3,
+ UART3 = 13,
#[doc = "14 - TIMER0 channel 0 or 1 interrupt"]
- TIMER0A,
+ TIMER0A = 14,
#[doc = "15 - TIMER0 channel 2 or 3 interrupt"]
- TIMER0B,
+ TIMER0B = 15,
#[doc = "16 - TIMER1 channel 0 or 1 interrupt"]
- TIMER1A,
+ TIMER1A = 16,
#[doc = "17 - TIMER1 channel 2 or 3 interrupt"]
- TIMER1B,
+ TIMER1B = 17,
#[doc = "18 - TIMER2 channel 0 or 1 interrupt"]
- TIMER2A,
+ TIMER2A = 18,
#[doc = "19 - TIMER2 channel 2 or 3 interrupt"]
- TIMER2B,
+ TIMER2B = 19,
#[doc = "20 - RTC"]
- RTC,
+ RTC = 20,
#[doc = "21 - WDT0"]
- WDT0,
+ WDT0 = 21,
#[doc = "22 - WDT1"]
- WDT1,
+ WDT1 = 22,
#[doc = "23 - APB_GPIO"]
- APB_GPIO,
+ APB_GPIO = 23,
#[doc = "24 - DVP"]
- DVP,
+ DVP = 24,
#[doc = "25 - KPU"]
- KPU,
+ KPU = 25,
#[doc = "26 - FFT"]
- FFT,
+ FFT = 26,
#[doc = "27 - DMA0"]
- DMA0,
+ DMA0 = 27,
#[doc = "28 - DMA1"]
- DMA1,
+ DMA1 = 28,
#[doc = "29 - DMA2"]
- DMA2,
+ DMA2 = 29,
#[doc = "30 - DMA3"]
- DMA3,
+ DMA3 = 30,
#[doc = "31 - DMA4"]
- DMA4,
+ DMA4 = 31,
#[doc = "32 - DMA5"]
- DMA5,
+ DMA5 = 32,
#[doc = "33 - UARTHS"]
- UARTHS,
+ UARTHS = 33,
#[doc = "34 - GPIOHS0"]
- GPIOHS0,
+ GPIOHS0 = 34,
#[doc = "35 - GPIOHS1"]
- GPIOHS1,
+ GPIOHS1 = 35,
#[doc = "36 - GPIOHS2"]
- GPIOHS2,
+ GPIOHS2 = 36,
#[doc = "37 - GPIOHS3"]
- GPIOHS3,
+ GPIOHS3 = 37,
#[doc = "38 - GPIOHS4"]
- GPIOHS4,
+ GPIOHS4 = 38,
#[doc = "39 - GPIOHS5"]
- GPIOHS5,
+ GPIOHS5 = 39,
#[doc = "40 - GPIOHS6"]
- GPIOHS6,
+ GPIOHS6 = 40,
#[doc = "41 - GPIOHS7"]
- GPIOHS7,
+ GPIOHS7 = 41,
#[doc = "42 - GPIOHS8"]
- GPIOHS8,
+ GPIOHS8 = 42,
#[doc = "43 - GPIOHS9"]
- GPIOHS9,
+ GPIOHS9 = 43,
#[doc = "44 - GPIOHS10"]
- GPIOHS10,
+ GPIOHS10 = 44,
#[doc = "45 - GPIOHS11"]
- GPIOHS11,
+ GPIOHS11 = 45,
#[doc = "46 - GPIOHS12"]
- GPIOHS12,
+ GPIOHS12 = 46,
#[doc = "47 - GPIOHS13"]
- GPIOHS13,
+ GPIOHS13 = 47,
#[doc = "48 - GPIOHS14"]
- GPIOHS14,
+ GPIOHS14 = 48,
#[doc = "49 - GPIOHS15"]
- GPIOHS15,
+ GPIOHS15 = 49,
#[doc = "50 - GPIOHS16"]
- GPIOHS16,
+ GPIOHS16 = 50,
#[doc = "51 - GPIOHS17"]
- GPIOHS17,
+ GPIOHS17 = 51,
#[doc = "52 - GPIOHS18"]
- GPIOHS18,
+ GPIOHS18 = 52,
#[doc = "53 - GPIOHS19"]
- GPIOHS19,
+ GPIOHS19 = 53,
#[doc = "54 - GPIOHS20"]
- GPIOHS20,
+ GPIOHS20 = 54,
#[doc = "55 - GPIOHS21"]
- GPIOHS21,
+ GPIOHS21 = 55,
#[doc = "56 - GPIOHS22"]
- GPIOHS22,
+ GPIOHS22 = 56,
#[doc = "57 - GPIOHS23"]
- GPIOHS23,
+ GPIOHS23 = 57,
#[doc = "58 - GPIOHS24"]
- GPIOHS24,
+ GPIOHS24 = 58,
#[doc = "59 - GPIOHS25"]
- GPIOHS25,
+ GPIOHS25 = 59,
#[doc = "60 - GPIOHS26"]
- GPIOHS26,
+ GPIOHS26 = 60,
#[doc = "61 - GPIOHS27"]
- GPIOHS27,
+ GPIOHS27 = 61,
#[doc = "62 - GPIOHS28"]
- GPIOHS28,
+ GPIOHS28 = 62,
#[doc = "63 - GPIOHS29"]
- GPIOHS29,
+ GPIOHS29 = 63,
#[doc = "64 - GPIOHS30"]
- GPIOHS30,
+ GPIOHS30 = 64,
#[doc = "65 - GPIOHS31"]
- GPIOHS31,
+ GPIOHS31 = 65,
}
unsafe impl bare_metal::Nr for Interrupt {
- #[inline]
+ #[inline(always)]
fn nr(&self) -> u8 {
- match *self {
- Interrupt::SPI0 => 1,
- Interrupt::SPI1 => 2,
- Interrupt::SPI_SLAVE => 3,
- Interrupt::SPI3 => 4,
- Interrupt::I2S0 => 5,
- Interrupt::I2S1 => 6,
- Interrupt::I2S2 => 7,
- Interrupt::I2C0 => 8,
- Interrupt::I2C1 => 9,
- Interrupt::I2C2 => 10,
- Interrupt::UART1 => 11,
- Interrupt::UART2 => 12,
- Interrupt::UART3 => 13,
- Interrupt::TIMER0A => 14,
- Interrupt::TIMER0B => 15,
- Interrupt::TIMER1A => 16,
- Interrupt::TIMER1B => 17,
- Interrupt::TIMER2A => 18,
- Interrupt::TIMER2B => 19,
- Interrupt::RTC => 20,
- Interrupt::WDT0 => 21,
- Interrupt::WDT1 => 22,
- Interrupt::APB_GPIO => 23,
- Interrupt::DVP => 24,
- Interrupt::KPU => 25,
- Interrupt::FFT => 26,
- Interrupt::DMA0 => 27,
- Interrupt::DMA1 => 28,
- Interrupt::DMA2 => 29,
- Interrupt::DMA3 => 30,
- Interrupt::DMA4 => 31,
- Interrupt::DMA5 => 32,
- Interrupt::UARTHS => 33,
- Interrupt::GPIOHS0 => 34,
- Interrupt::GPIOHS1 => 35,
- Interrupt::GPIOHS2 => 36,
- Interrupt::GPIOHS3 => 37,
- Interrupt::GPIOHS4 => 38,
- Interrupt::GPIOHS5 => 39,
- Interrupt::GPIOHS6 => 40,
- Interrupt::GPIOHS7 => 41,
- Interrupt::GPIOHS8 => 42,
- Interrupt::GPIOHS9 => 43,
- Interrupt::GPIOHS10 => 44,
- Interrupt::GPIOHS11 => 45,
- Interrupt::GPIOHS12 => 46,
- Interrupt::GPIOHS13 => 47,
- Interrupt::GPIOHS14 => 48,
- Interrupt::GPIOHS15 => 49,
- Interrupt::GPIOHS16 => 50,
- Interrupt::GPIOHS17 => 51,
- Interrupt::GPIOHS18 => 52,
- Interrupt::GPIOHS19 => 53,
- Interrupt::GPIOHS20 => 54,
- Interrupt::GPIOHS21 => 55,
- Interrupt::GPIOHS22 => 56,
- Interrupt::GPIOHS23 => 57,
- Interrupt::GPIOHS24 => 58,
- Interrupt::GPIOHS25 => 59,
- Interrupt::GPIOHS26 => 60,
- Interrupt::GPIOHS27 => 61,
- Interrupt::GPIOHS28 => 62,
- Interrupt::GPIOHS29 => 63,
- Interrupt::GPIOHS30 => 64,
- Interrupt::GPIOHS31 => 65,
- }
+ *self as u8
}
}
#[derive(Debug, Copy, Clone)]
@@ -330,7 +283,12 @@ pub mod interrupt {
#[doc = r" }"]
#[doc = r" }"]
#[doc = r" ```"]
- macro_rules ! interrupt { ( $ NAME : ident , $ path : path , locals : { $ ( $ lvar : ident : $ lty : ty = $ lval : expr ; ) * } ) => { # [ allow ( non_snake_case ) ] mod $ NAME { pub struct Locals { $ ( pub $ lvar : $ lty , ) * } } # [ allow ( non_snake_case ) ] # [ no_mangle ] pub extern "C" fn $ NAME ( ) { let _ = $ crate :: interrupt :: Interrupt :: $ NAME ; static mut LOCALS : self :: $ NAME :: Locals = self :: $ NAME :: Locals { $ ( $ lvar : $ lval , ) * } ; let f : fn ( & mut self :: $ NAME :: Locals ) = $ path ; f ( unsafe { & mut LOCALS } ) ; } } ; ( $ NAME : ident , $ path : path ) => { # [ allow ( non_snake_case ) ] # [ no_mangle ] pub extern "C" fn $ NAME ( ) { let _ = $ crate :: interrupt :: Interrupt :: $ NAME ; let f : fn ( ) = $ path ; f ( ) ; } } }
+ macro_rules ! interrupt { ( $ NAME : ident , $ path : path , locals : { $ ( $ lvar : ident : $ lty : ty = $ lval : expr ; ) * } ) => { # [ allow ( non_snake_case ) ]
+mod $ NAME { pub struct Locals { $ ( pub $ lvar : $ lty , ) * } } # [ allow ( non_snake_case ) ]
+# [ no_mangle ]
+pub extern "C" fn $ NAME ( ) { let _ = $ crate :: interrupt :: Interrupt :: $ NAME ; static mut LOCALS : self :: $ NAME :: Locals = self :: $ NAME :: Locals { $ ( $ lvar : $ lval , ) * } ; let f : fn ( & mut self :: $ NAME :: Locals ) = $ path ; f ( unsafe { & mut LOCALS } ) ; } } ; ( $ NAME : ident , $ path : path ) => { # [ allow ( non_snake_case ) ]
+# [ no_mangle ]
+pub extern "C" fn $ NAME ( ) { let _ = $ crate :: interrupt :: Interrupt :: $ NAME ; let f : fn ( ) = $ path ; f ( ) ; } } }
}
pub use self::interrupt::Interrupt;
#[allow(unused_imports)]
@@ -338,25 +296,25 @@ use generic::*;
#[doc = r"Common register and bit access and modify traits"]
pub mod generic {
use core::marker;
- ///This trait shows that register has `read` method
- ///
- ///Registers marked with `Writable` can be also `modify`'ed
+ #[doc = "This trait shows that register has `read` method"]
+ #[doc = ""]
+ #[doc = "Registers marked with `Writable` can be also `modify`'ed"]
pub trait Readable {}
- ///This trait shows that register has `write`, `write_with_zero` and `reset` method
- ///
- ///Registers marked with `Readable` can be also `modify`'ed
+ #[doc = "This trait shows that register has `write`, `write_with_zero` and `reset` method"]
+ #[doc = ""]
+ #[doc = "Registers marked with `Readable` can be also `modify`'ed"]
pub trait Writable {}
- ///Reset value of the register
- ///
- ///This value is initial value for `write` method.
- ///It can be also directly writed to register by `reset` method.
+ #[doc = "Reset value of the register"]
+ #[doc = ""]
+ #[doc = "This value is initial value for `write` method."]
+ #[doc = "It can be also directly writed to register by `reset` method."]
pub trait ResetValue {
- ///Register size
+ #[doc = "Register size"]
type Type;
- ///Reset value of the register
+ #[doc = "Reset value of the register"]
fn reset_value() -> Self::Type;
}
- ///This structure provides volatile access to register
+ #[doc = "This structure provides volatile access to register"]
pub struct Reg {
register: vcell::VolatileCell,
_marker: marker::PhantomData,
@@ -367,18 +325,18 @@ pub mod generic {
Self: Readable,
U: Copy,
{
- ///Reads the contents of `Readable` register
- ///
- ///You can read the contents of a register in such way:
- ///```ignore
- ///let bits = periph.reg.read().bits();
- ///```
- ///or get the content of a particular field of a register.
- ///```ignore
- ///let reader = periph.reg.read();
- ///let bits = reader.field1().bits();
- ///let flag = reader.field2().bit_is_set();
- ///```
+ #[doc = "Reads the contents of `Readable` register"]
+ #[doc = ""]
+ #[doc = "You can read the contents of a register in such way:"]
+ #[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) -> R {
R {
@@ -392,9 +350,9 @@ pub mod generic {
Self: ResetValue + Writable,
U: Copy,
{
- ///Writes the reset value to `Writable` register
- ///
- ///Resets the register to its initial state
+ #[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(Self::reset_value())
@@ -405,21 +363,21 @@ pub mod generic {
Self: ResetValue + Writable,
U: Copy,
{
- ///Writes bits to `Writable` register
- ///
- ///You can write raw bits into a register:
- ///```ignore
- ///periph.reg.write(|w| unsafe { w.bits(rawbits) });
- ///```
- ///or write only the fields you need:
- ///```ignore
- ///periph.reg.write(|w| w
- /// .field1().bits(newfield1bits)
- /// .field2().set_bit()
- /// .field3().variant(VARIANT)
- ///);
- ///```
- ///Other fields will have reset value.
+ #[doc = "Writes bits to `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 = "Other fields will have reset value."]
#[inline(always)]
pub fn write(&self, f: F)
where
@@ -439,9 +397,9 @@ pub mod generic {
Self: Writable,
U: Copy + Default,
{
- ///Writes Zero to `Writable` register
- ///
- ///Similar to `write`, but unused bits will contain 0.
+ #[doc = "Writes Zero to `Writable` register"]
+ #[doc = ""]
+ #[doc = "Similar to `write`, but unused bits will contain 0."]
#[inline(always)]
pub fn write_with_zero(&self, f: F)
where
@@ -461,23 +419,23 @@ pub mod generic {
Self: Readable + Writable,
U: Copy,
{
- ///Modifies the contents of the register
- ///
- ///E.g. to do a read-modify-write sequence to change parts of a register:
- ///```ignore
- ///periph.reg.modify(|r, w| unsafe { w.bits(
- /// r.bits() | 3
- ///) });
- ///```
- ///or
- ///```ignore
- ///periph.reg.modify(|_, w| w
- /// .field1().bits(newfield1bits)
- /// .field2().set_bit()
- /// .field3().variant(VARIANT)
- ///);
- ///```
- ///Other fields will have value they had before call `modify`.
+ #[doc = "Modifies the contents of the register"]
+ #[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 = "Other fields will have value they had before call `modify`."]
#[inline(always)]
pub fn modify(&self, f: F)
where
@@ -499,10 +457,10 @@ pub mod generic {
);
}
}
- ///Register/field reader
- ///
- ///Result of the [`read`](Reg::read) method of a register.
- ///Also it can be used in the [`modify`](Reg::read) method
+ #[doc = "Register/field reader"]
+ #[doc = ""]
+ #[doc = "Result of the [`read`](Reg::read) method of a register."]
+ #[doc = "Also it can be used in the [`modify`](Reg::read) method"]
pub struct R {
pub(crate) bits: U,
_reg: marker::PhantomData,
@@ -511,7 +469,7 @@ pub mod generic {
where
U: Copy,
{
- ///Create new instance of reader
+ #[doc = "Create new instance of reader"]
#[inline(always)]
pub(crate) fn new(bits: U) -> Self {
Self {
@@ -519,7 +477,7 @@ pub mod generic {
_reg: marker::PhantomData,
}
}
- ///Read raw bits from register/field
+ #[doc = "Read raw bits from register/field"]
#[inline(always)]
pub fn bits(&self) -> U {
self.bits
@@ -536,44 +494,44 @@ pub mod generic {
}
}
impl R {
- ///Value of the field as raw bits
+ #[doc = "Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
- ///Returns `true` if the bit is clear (0)
+ #[doc = "Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
- ///Returns `true` if the bit is set (1)
+ #[doc = "Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
- ///Register writer
- ///
- ///Used as an argument to the closures in the [`write`](Reg::write) and [`modify`](Reg::modify) methods of the register
+ #[doc = "Register writer"]
+ #[doc = ""]
+ #[doc = "Used as an argument to the closures in the [`write`](Reg::write) and [`modify`](Reg::modify) methods of the register"]
pub struct W {
- ///Writable bits
+ #[doc = "Writable bits"]
pub(crate) bits: U,
_reg: marker::PhantomData,
}
impl W {
- ///Writes raw bits to the register
+ #[doc = "Writes raw bits to the register"]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: U) -> &mut Self {
self.bits = bits;
self
}
}
- ///Used if enumerated values cover not the whole range
+ #[doc = "Used if enumerated values cover not the whole range"]
#[derive(Clone, Copy, PartialEq)]
pub enum Variant {
- ///Expected variant
+ #[doc = "Expected variant"]
Val(T),
- ///Raw bits
+ #[doc = "Raw bits"]
Res(U),
}
}
@@ -591,6 +549,7 @@ impl CLINT {
}
impl Deref for CLINT {
type Target = clint::RegisterBlock;
+ #[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*CLINT::ptr() }
}
@@ -609,7 +568,7 @@ pub mod clint {
#[doc = "0xbff8 - Timer register"]
pub mtime: MTIME,
}
- #[doc = "Hart software interrupt register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [msip](msip) module"]
+ #[doc = "Hart software interrupt register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [msip](msip) module"]
pub type MSIP = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -624,7 +583,8 @@ pub mod clint {
pub type R = crate::R;
#[doc = "Writer for register msip[%s]"]
pub type W = crate::W;
- #[doc = "Register msip[%s] `reset()`'s with value 0"]
+ #[doc = "Register msip[%s]
+`reset()`'s with value 0"]
impl crate::ResetValue for super::MSIP {
type Type = u32;
#[inline(always)]
@@ -635,7 +595,7 @@ pub mod clint {
impl R {}
impl W {}
}
- #[doc = "Hart time comparator register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mtimecmp](mtimecmp) module"]
+ #[doc = "Hart time comparator register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [mtimecmp](mtimecmp) module"]
pub type MTIMECMP = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -650,7 +610,8 @@ pub mod clint {
pub type R = crate::R;
#[doc = "Writer for register mtimecmp[%s]"]
pub type W = crate::W;
- #[doc = "Register mtimecmp[%s] `reset()`'s with value 0"]
+ #[doc = "Register mtimecmp[%s]
+`reset()`'s with value 0"]
impl crate::ResetValue for super::MTIMECMP {
type Type = u64;
#[inline(always)]
@@ -661,7 +622,7 @@ pub mod clint {
impl R {}
impl W {}
}
- #[doc = "Timer register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mtime](mtime) module"]
+ #[doc = "Timer register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [mtime](mtime) module"]
pub type MTIME = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -702,6 +663,7 @@ impl PLIC {
}
impl Deref for PLIC {
type Target = plic::RegisterBlock;
+ #[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*PLIC::ptr() }
}
@@ -731,7 +693,7 @@ pub mod plic {
#[doc = r"Register block"]
#[doc = "Target Interrupt Enables"]
pub mod target_enables {
- #[doc = "Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [enable](enable) module"]
+ #[doc = "Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [enable](enable) module"]
pub type ENABLE = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -746,7 +708,8 @@ pub mod plic {
pub type R = crate::R;
#[doc = "Writer for register enable[%s]"]
pub type W = crate::W;
- #[doc = "Register enable[%s] `reset()`'s with value 0"]
+ #[doc = "Register enable[%s]
+`reset()`'s with value 0"]
impl crate::ResetValue for super::ENABLE {
type Type = u32;
#[inline(always)]
@@ -772,7 +735,7 @@ pub mod plic {
#[doc = r"Register block"]
#[doc = "Target Configuration"]
pub mod targets {
- #[doc = "Priority Threshold Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [threshold](threshold) module"]
+ #[doc = "Priority Threshold Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [threshold](threshold) module"]
pub type THRESHOLD = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -797,37 +760,29 @@ pub mod plic {
}
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
+ #[repr(u8)]
pub enum PRIORITY_A {
#[doc = "0: Never interrupt"]
- NEVER,
+ NEVER = 0,
#[doc = "1: Priority 1"]
- P1,
+ P1 = 1,
#[doc = "2: Priority 2"]
- P2,
+ P2 = 2,
#[doc = "3: Priority 3"]
- P3,
+ P3 = 3,
#[doc = "4: Priority 4"]
- P4,
+ P4 = 4,
#[doc = "5: Priority 5"]
- P5,
+ P5 = 5,
#[doc = "6: Priority 6"]
- P6,
+ P6 = 6,
#[doc = "7: Priority 7"]
- P7,
+ P7 = 7,
}
impl From for u8 {
#[inline(always)]
fn from(variant: PRIORITY_A) -> Self {
- match variant {
- PRIORITY_A::NEVER => 0,
- PRIORITY_A::P1 => 1,
- PRIORITY_A::P2 => 2,
- PRIORITY_A::P3 => 3,
- PRIORITY_A::P4 => 4,
- PRIORITY_A::P5 => 5,
- PRIORITY_A::P6 => 6,
- PRIORITY_A::P7 => 7,
- }
+ variant as _
}
}
#[doc = "Reader of field `priority`"]
@@ -963,7 +918,7 @@ pub mod plic {
}
}
}
- #[doc = "Claim/Complete Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [claim](claim) module"]
+ #[doc = "Claim/Complete Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [claim](claim) module"]
pub type CLAIM = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -989,7 +944,7 @@ pub mod plic {
impl R {}
impl W {}
}
- #[doc = "Padding to make sure targets is an array\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [_reserved](_reserved) module"]
+ #[doc = "Padding to make sure targets is an array\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [_reserved](_reserved) module"]
pub type _RESERVED = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -1016,7 +971,7 @@ pub mod plic {
impl W {}
}
}
- #[doc = "Interrupt Source Priority Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [priority](priority) module"]
+ #[doc = "Interrupt Source Priority Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [priority](priority) module"]
pub type PRIORITY = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -1031,7 +986,8 @@ pub mod plic {
pub type R = crate::R;
#[doc = "Writer for register priority[%s]"]
pub type W = crate::W;
- #[doc = "Register priority[%s] `reset()`'s with value 0"]
+ #[doc = "Register priority[%s]
+`reset()`'s with value 0"]
impl crate::ResetValue for super::PRIORITY {
type Type = u32;
#[inline(always)]
@@ -1042,7 +998,7 @@ pub mod plic {
impl R {}
impl W {}
}
- #[doc = "Interrupt Pending Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pending](pending) module"]
+ #[doc = "Interrupt Pending Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pending](pending) module"]
pub type PENDING = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -1057,7 +1013,8 @@ pub mod plic {
pub type R = crate::R;
#[doc = "Writer for register pending[%s]"]
pub type W = crate::W;
- #[doc = "Register pending[%s] `reset()`'s with value 0"]
+ #[doc = "Register pending[%s]
+`reset()`'s with value 0"]
impl crate::ResetValue for super::PENDING {
type Type = u32;
#[inline(always)]
@@ -1083,6 +1040,7 @@ impl UARTHS {
}
impl Deref for UARTHS {
type Target = uarths::RegisterBlock;
+ #[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*UARTHS::ptr() }
}
@@ -1107,7 +1065,7 @@ pub mod uarths {
#[doc = "0x18 - Baud Rate Divisor Register"]
pub div: DIV,
}
- #[doc = "Transmit Data Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [txdata](txdata) module"]
+ #[doc = "Transmit Data Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [txdata](txdata) module"]
pub type TXDATA = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -1193,7 +1151,7 @@ pub mod uarths {
}
}
}
- #[doc = "Receive Data Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rxdata](rxdata) module"]
+ #[doc = "Receive Data Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rxdata](rxdata) module"]
pub type RXDATA = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -1279,7 +1237,7 @@ pub mod uarths {
}
}
}
- #[doc = "Transmit Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [txctrl](txctrl) module"]
+ #[doc = "Transmit Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [txctrl](txctrl) module"]
pub type TXCTRL = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -1399,7 +1357,7 @@ pub mod uarths {
}
}
}
- #[doc = "Receive Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rxctrl](rxctrl) module"]
+ #[doc = "Receive Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rxctrl](rxctrl) module"]
pub type RXCTRL = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -1485,7 +1443,7 @@ pub mod uarths {
}
}
}
- #[doc = "Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ie](ie) module"]
+ #[doc = "Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ie](ie) module"]
pub type IE = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -1581,7 +1539,7 @@ pub mod uarths {
}
}
}
- #[doc = "Interrupt Pending Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ip](ip) module"]
+ #[doc = "Interrupt Pending Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ip](ip) module"]
pub type IP = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -1677,7 +1635,7 @@ pub mod uarths {
}
}
}
- #[doc = "Baud Rate Divisor Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [div](div) module"]
+ #[doc = "Baud Rate Divisor Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [div](div) module"]
pub type DIV = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -1744,6 +1702,7 @@ impl GPIOHS {
}
impl Deref for GPIOHS {
type Target = gpiohs::RegisterBlock;
+ #[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*GPIOHS::ptr() }
}
@@ -1788,7 +1747,7 @@ pub mod gpiohs {
#[doc = "0x40 - Output XOR (invert) Register"]
pub output_xor: OUTPUT_XOR,
}
- #[doc = "Input Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [input_val](input_val) module"]
+ #[doc = "Input Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [input_val](input_val) module"]
pub type INPUT_VAL = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
@@ -1811,13 +1770,14 @@ pub mod gpiohs {
0
}
}
- #[doc = "Reader of field `pin0`"]
- pub type PIN0_R = crate::R;
- #[doc = "Write proxy for field `pin0`"]
- pub struct PIN0_W<'a> {
+ #[doc = "Reader of field `pin%s`"]
+ pub type PIN_R = crate::R;
+ #[doc = "Write proxy for fields `pin(0-31)`"]
+ pub struct PIN_W<'a> {
w: &'a mut W,
+ offset: usize,
}
- impl<'a> PIN0_W<'a> {
+ impl<'a> PIN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
@@ -1831,545 +1791,443 @@ pub mod gpiohs {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
+ self.w.bits = (self.w.bits & !(0x01 << self.offset))
+ | (((value as u32) & 0x01) << self.offset);
self.w
}
}
- #[doc = "Reader of field `pin1`"]
- pub type PIN1_R = crate::R;
- #[doc = "Write proxy for field `pin1`"]
- pub struct PIN1_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN1_W<'a> {
- #[doc = r"Sets the field bit"]
+ impl R {
+ #[doc = ""]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub unsafe fn pin(&self, n: usize) -> PIN_R {
+ PIN_R::new(((self.bits >> n) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin0(&self) -> PIN_R {
+ PIN_R::new((self.bits & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
- self.w
+ pub fn pin1(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 1) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin2`"]
- pub type PIN2_R = crate::R;
- #[doc = "Write proxy for field `pin2`"]
- pub struct PIN2_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN2_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 2"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin2(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 2) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 3"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin3(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 3) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 4"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
- self.w
+ pub fn pin4(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 4) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin3`"]
- pub type PIN3_R = crate::R;
- #[doc = "Write proxy for field `pin3`"]
- pub struct PIN3_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN3_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 5"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin5(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 5) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 6"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin6(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 6) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 7"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
- self.w
+ pub fn pin7(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 7) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin4`"]
- pub type PIN4_R = crate::R;
- #[doc = "Write proxy for field `pin4`"]
- pub struct PIN4_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN4_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 8"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin8(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 8) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 9"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin9(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 9) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 10"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
- self.w
+ pub fn pin10(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 10) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin5`"]
- pub type PIN5_R = crate::R;
- #[doc = "Write proxy for field `pin5`"]
- pub struct PIN5_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN5_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 11"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin11(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 11) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 12"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin12(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 12) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 13"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
- self.w
+ pub fn pin13(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 13) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin6`"]
- pub type PIN6_R = crate::R;
- #[doc = "Write proxy for field `pin6`"]
- pub struct PIN6_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN6_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 14"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin14(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 14) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 15"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin15(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 15) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 16"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
- self.w
+ pub fn pin16(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 16) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin7`"]
- pub type PIN7_R = crate::R;
- #[doc = "Write proxy for field `pin7`"]
- pub struct PIN7_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN7_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 17"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin17(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 17) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 18"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin18(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 18) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 19"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
- self.w
+ pub fn pin19(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 19) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin8`"]
- pub type PIN8_R = crate::R;
- #[doc = "Write proxy for field `pin8`"]
- pub struct PIN8_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN8_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 20"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin20(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 20) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 21"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin21(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 21) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 22"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
- self.w
+ pub fn pin22(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 22) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin9`"]
- pub type PIN9_R = crate::R;
- #[doc = "Write proxy for field `pin9`"]
- pub struct PIN9_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN9_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 23"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin23(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 23) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 24"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin24(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 24) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 25"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
- self.w
+ pub fn pin25(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 25) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin10`"]
- pub type PIN10_R = crate::R;
- #[doc = "Write proxy for field `pin10`"]
- pub struct PIN10_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN10_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 26"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin26(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 26) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 27"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin27(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 27) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 28"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
- self.w
+ pub fn pin28(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 28) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin11`"]
- pub type PIN11_R = crate::R;
- #[doc = "Write proxy for field `pin11`"]
- pub struct PIN11_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN11_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 29"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin29(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 29) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 30"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin30(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 30) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 31"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
- self.w
+ pub fn pin31(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 31) & 0x01) != 0)
}
}
- #[doc = "Reader of field `pin12`"]
- pub type PIN12_R = crate::R;
- #[doc = "Write proxy for field `pin12`"]
- pub struct PIN12_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN12_W<'a> {
- #[doc = r"Sets the field bit"]
+ impl W {
+ #[doc = ""]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub unsafe fn pin(&mut self, n: usize) -> PIN_W {
+ PIN_W { w: self, offset: n }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin0(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 0 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
- self.w
+ pub fn pin1(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 1 }
}
- }
- #[doc = "Reader of field `pin13`"]
- pub type PIN13_R = crate::R;
- #[doc = "Write proxy for field `pin13`"]
- pub struct PIN13_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN13_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 2"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin2(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 2 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 3"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin3(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 3 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 4"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13);
- self.w
+ pub fn pin4(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 4 }
}
- }
- #[doc = "Reader of field `pin14`"]
- pub type PIN14_R = crate::R;
- #[doc = "Write proxy for field `pin14`"]
- pub struct PIN14_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN14_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 5"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin5(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 5 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 6"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin6(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 6 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 7"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
- self.w
+ pub fn pin7(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 7 }
}
- }
- #[doc = "Reader of field `pin15`"]
- pub type PIN15_R = crate::R;
- #[doc = "Write proxy for field `pin15`"]
- pub struct PIN15_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN15_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 8"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin8(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 8 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 9"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin9(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 9 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 10"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
- self.w
+ pub fn pin10(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 10,
+ }
}
- }
- #[doc = "Reader of field `pin16`"]
- pub type PIN16_R = crate::R;
- #[doc = "Write proxy for field `pin16`"]
- pub struct PIN16_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN16_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 11"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin11(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 11,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 12"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin12(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 12,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 13"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
- self.w
+ pub fn pin13(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 13,
+ }
}
- }
- #[doc = "Reader of field `pin17`"]
- pub type PIN17_R = crate::R;
- #[doc = "Write proxy for field `pin17`"]
- pub struct PIN17_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN17_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 14"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin14(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 14,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 15"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin15(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 15,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 16"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17);
- self.w
+ pub fn pin16(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 16,
+ }
}
- }
- #[doc = "Reader of field `pin18`"]
- pub type PIN18_R = crate::R;
- #[doc = "Write proxy for field `pin18`"]
- pub struct PIN18_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN18_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 17"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin17(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 17,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 18"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin18(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 18,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 19"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18);
- self.w
+ pub fn pin19(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 19,
+ }
}
- }
- #[doc = "Reader of field `pin19`"]
- pub type PIN19_R = crate::R;
- #[doc = "Write proxy for field `pin19`"]
- pub struct PIN19_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN19_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 20"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin20(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 20,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 21"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin21(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 21,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 22"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19);
- self.w
+ pub fn pin22(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 22,
+ }
}
- }
- #[doc = "Reader of field `pin20`"]
- pub type PIN20_R = crate::R;
- #[doc = "Write proxy for field `pin20`"]
- pub struct PIN20_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN20_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 23"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin23(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 23,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 24"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin24(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 24,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 25"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20);
- self.w
+ pub fn pin25(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 25,
+ }
}
- }
- #[doc = "Reader of field `pin21`"]
- pub type PIN21_R = crate::R;
- #[doc = "Write proxy for field `pin21`"]
- pub struct PIN21_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN21_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 26"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin26(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 26,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 27"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin27(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 27,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 28"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21);
- self.w
+ pub fn pin28(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 28,
+ }
}
- }
- #[doc = "Reader of field `pin22`"]
- pub type PIN22_R = crate::R;
- #[doc = "Write proxy for field `pin22`"]
- pub struct PIN22_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN22_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 29"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin29(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 29,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 30"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin30(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 30,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 31"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22);
- self.w
+ pub fn pin31(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 31,
+ }
+ }
+ }
+ }
+ #[doc = "Pin Input Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [input_en](input_en) module"]
+ pub type INPUT_EN = crate::Reg;
+ #[allow(missing_docs)]
+ #[doc(hidden)]
+ pub struct _INPUT_EN;
+ #[doc = "`read()` method returns [input_en::R](input_en::R) reader structure"]
+ impl crate::Readable for INPUT_EN {}
+ #[doc = "`write(|w| ..)` method takes [input_en::W](input_en::W) writer structure"]
+ impl crate::Writable for INPUT_EN {}
+ #[doc = "Pin Input Enable Register"]
+ pub mod input_en {
+ #[doc = "Reader of register input_en"]
+ pub type R = crate::R;
+ #[doc = "Writer for register input_en"]
+ pub type W = crate::W;
+ #[doc = "Register input_en `reset()`'s with value 0"]
+ impl crate::ResetValue for super::INPUT_EN {
+ type Type = u32;
+ #[inline(always)]
+ fn reset_value() -> Self::Type {
+ 0
}
}
- #[doc = "Reader of field `pin23`"]
- pub type PIN23_R = crate::R;
- #[doc = "Write proxy for field `pin23`"]
- pub struct PIN23_W<'a> {
+ #[doc = "Reader of field `pin%s`"]
+ pub type PIN_R = crate::R;
+ #[doc = "Write proxy for fields `pin(0-31)`"]
+ pub struct PIN_W<'a> {
w: &'a mut W,
+ offset: usize,
}
- impl<'a> PIN23_W<'a> {
+ impl<'a> PIN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
@@ -2383,821 +2241,893 @@ pub mod gpiohs {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23);
+ self.w.bits = (self.w.bits & !(0x01 << self.offset))
+ | (((value as u32) & 0x01) << self.offset);
self.w
}
}
- #[doc = "Reader of field `pin24`"]
- pub type PIN24_R = crate::R;
- #[doc = "Write proxy for field `pin24`"]
- pub struct PIN24_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN24_W<'a> {
- #[doc = r"Sets the field bit"]
+ impl R {
+ #[doc = ""]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub unsafe fn pin(&self, n: usize) -> PIN_R {
+ PIN_R::new(((self.bits >> n) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin0(&self) -> PIN_R {
+ PIN_R::new((self.bits & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24);
- self.w
+ pub fn pin1(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 1) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin25`"]
- pub type PIN25_R = crate::R;
- #[doc = "Write proxy for field `pin25`"]
- pub struct PIN25_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN25_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 2"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin2(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 2) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 3"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin3(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 3) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 4"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25);
- self.w
+ pub fn pin4(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 4) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin26`"]
- pub type PIN26_R = crate::R;
- #[doc = "Write proxy for field `pin26`"]
- pub struct PIN26_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN26_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 5"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin5(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 5) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 6"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin6(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 6) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 7"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26);
- self.w
+ pub fn pin7(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 7) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin27`"]
- pub type PIN27_R = crate::R;
- #[doc = "Write proxy for field `pin27`"]
- pub struct PIN27_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN27_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 8"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin8(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 8) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 9"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin9(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 9) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 10"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27);
- self.w
+ pub fn pin10(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 10) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin28`"]
- pub type PIN28_R = crate::R;
- #[doc = "Write proxy for field `pin28`"]
- pub struct PIN28_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN28_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 11"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin11(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 11) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 12"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin12(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 12) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 13"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28);
- self.w
+ pub fn pin13(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 13) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin29`"]
- pub type PIN29_R = crate::R;
- #[doc = "Write proxy for field `pin29`"]
- pub struct PIN29_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN29_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 14"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin14(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 14) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 15"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin15(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 15) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 16"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29);
- self.w
+ pub fn pin16(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 16) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin30`"]
- pub type PIN30_R = crate::R;
- #[doc = "Write proxy for field `pin30`"]
- pub struct PIN30_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN30_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 17"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin17(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 17) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 18"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin18(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 18) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 19"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30);
- self.w
+ pub fn pin19(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 19) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin31`"]
- pub type PIN31_R = crate::R;
- #[doc = "Write proxy for field `pin31`"]
- pub struct PIN31_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN31_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 20"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin20(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 20) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 21"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin21(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 21) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 22"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31);
- self.w
+ pub fn pin22(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 22) & 0x01) != 0)
+ }
+ #[doc = "Bit 23"]
+ #[inline(always)]
+ pub fn pin23(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 23) & 0x01) != 0)
+ }
+ #[doc = "Bit 24"]
+ #[inline(always)]
+ pub fn pin24(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 24) & 0x01) != 0)
+ }
+ #[doc = "Bit 25"]
+ #[inline(always)]
+ pub fn pin25(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 25) & 0x01) != 0)
+ }
+ #[doc = "Bit 26"]
+ #[inline(always)]
+ pub fn pin26(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 26) & 0x01) != 0)
+ }
+ #[doc = "Bit 27"]
+ #[inline(always)]
+ pub fn pin27(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 27) & 0x01) != 0)
+ }
+ #[doc = "Bit 28"]
+ #[inline(always)]
+ pub fn pin28(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 28) & 0x01) != 0)
+ }
+ #[doc = "Bit 29"]
+ #[inline(always)]
+ pub fn pin29(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 29) & 0x01) != 0)
+ }
+ #[doc = "Bit 30"]
+ #[inline(always)]
+ pub fn pin30(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 30) & 0x01) != 0)
+ }
+ #[doc = "Bit 31"]
+ #[inline(always)]
+ pub fn pin31(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 31) & 0x01) != 0)
}
}
- impl R {
+ impl W {
+ #[doc = ""]
+ #[inline(always)]
+ pub unsafe fn pin(&mut self, n: usize) -> PIN_W {
+ PIN_W { w: self, offset: n }
+ }
#[doc = "Bit 0"]
#[inline(always)]
- pub fn pin0(&self) -> PIN0_R {
- PIN0_R::new((self.bits & 0x01) != 0)
+ pub fn pin0(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 0 }
}
#[doc = "Bit 1"]
#[inline(always)]
- pub fn pin1(&self) -> PIN1_R {
- PIN1_R::new(((self.bits >> 1) & 0x01) != 0)
+ pub fn pin1(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 1 }
}
#[doc = "Bit 2"]
#[inline(always)]
- pub fn pin2(&self) -> PIN2_R {
- PIN2_R::new(((self.bits >> 2) & 0x01) != 0)
+ pub fn pin2(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 2 }
}
#[doc = "Bit 3"]
#[inline(always)]
- pub fn pin3(&self) -> PIN3_R {
- PIN3_R::new(((self.bits >> 3) & 0x01) != 0)
+ pub fn pin3(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 3 }
}
#[doc = "Bit 4"]
#[inline(always)]
- pub fn pin4(&self) -> PIN4_R {
- PIN4_R::new(((self.bits >> 4) & 0x01) != 0)
+ pub fn pin4(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 4 }
}
#[doc = "Bit 5"]
#[inline(always)]
- pub fn pin5(&self) -> PIN5_R {
- PIN5_R::new(((self.bits >> 5) & 0x01) != 0)
+ pub fn pin5(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 5 }
}
#[doc = "Bit 6"]
#[inline(always)]
- pub fn pin6(&self) -> PIN6_R {
- PIN6_R::new(((self.bits >> 6) & 0x01) != 0)
+ pub fn pin6(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 6 }
}
#[doc = "Bit 7"]
#[inline(always)]
- pub fn pin7(&self) -> PIN7_R {
- PIN7_R::new(((self.bits >> 7) & 0x01) != 0)
+ pub fn pin7(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 7 }
}
#[doc = "Bit 8"]
#[inline(always)]
- pub fn pin8(&self) -> PIN8_R {
- PIN8_R::new(((self.bits >> 8) & 0x01) != 0)
+ pub fn pin8(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 8 }
}
#[doc = "Bit 9"]
#[inline(always)]
- pub fn pin9(&self) -> PIN9_R {
- PIN9_R::new(((self.bits >> 9) & 0x01) != 0)
+ pub fn pin9(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 9 }
}
#[doc = "Bit 10"]
#[inline(always)]
- pub fn pin10(&self) -> PIN10_R {
- PIN10_R::new(((self.bits >> 10) & 0x01) != 0)
+ pub fn pin10(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 10,
+ }
}
#[doc = "Bit 11"]
#[inline(always)]
- pub fn pin11(&self) -> PIN11_R {
- PIN11_R::new(((self.bits >> 11) & 0x01) != 0)
+ pub fn pin11(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 11,
+ }
}
#[doc = "Bit 12"]
#[inline(always)]
- pub fn pin12(&self) -> PIN12_R {
- PIN12_R::new(((self.bits >> 12) & 0x01) != 0)
+ pub fn pin12(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 12,
+ }
}
#[doc = "Bit 13"]
#[inline(always)]
- pub fn pin13(&self) -> PIN13_R {
- PIN13_R::new(((self.bits >> 13) & 0x01) != 0)
+ pub fn pin13(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 13,
+ }
}
#[doc = "Bit 14"]
#[inline(always)]
- pub fn pin14(&self) -> PIN14_R {
- PIN14_R::new(((self.bits >> 14) & 0x01) != 0)
+ pub fn pin14(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 14,
+ }
}
#[doc = "Bit 15"]
#[inline(always)]
- pub fn pin15(&self) -> PIN15_R {
- PIN15_R::new(((self.bits >> 15) & 0x01) != 0)
+ pub fn pin15(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 15,
+ }
}
#[doc = "Bit 16"]
#[inline(always)]
- pub fn pin16(&self) -> PIN16_R {
- PIN16_R::new(((self.bits >> 16) & 0x01) != 0)
+ pub fn pin16(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 16,
+ }
}
#[doc = "Bit 17"]
#[inline(always)]
- pub fn pin17(&self) -> PIN17_R {
- PIN17_R::new(((self.bits >> 17) & 0x01) != 0)
+ pub fn pin17(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 17,
+ }
}
#[doc = "Bit 18"]
#[inline(always)]
- pub fn pin18(&self) -> PIN18_R {
- PIN18_R::new(((self.bits >> 18) & 0x01) != 0)
+ pub fn pin18(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 18,
+ }
}
#[doc = "Bit 19"]
#[inline(always)]
- pub fn pin19(&self) -> PIN19_R {
- PIN19_R::new(((self.bits >> 19) & 0x01) != 0)
+ pub fn pin19(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 19,
+ }
}
#[doc = "Bit 20"]
#[inline(always)]
- pub fn pin20(&self) -> PIN20_R {
- PIN20_R::new(((self.bits >> 20) & 0x01) != 0)
+ pub fn pin20(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 20,
+ }
}
#[doc = "Bit 21"]
#[inline(always)]
- pub fn pin21(&self) -> PIN21_R {
- PIN21_R::new(((self.bits >> 21) & 0x01) != 0)
+ pub fn pin21(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 21,
+ }
}
#[doc = "Bit 22"]
#[inline(always)]
- pub fn pin22(&self) -> PIN22_R {
- PIN22_R::new(((self.bits >> 22) & 0x01) != 0)
+ pub fn pin22(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 22,
+ }
}
#[doc = "Bit 23"]
#[inline(always)]
- pub fn pin23(&self) -> PIN23_R {
- PIN23_R::new(((self.bits >> 23) & 0x01) != 0)
+ pub fn pin23(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 23,
+ }
}
#[doc = "Bit 24"]
#[inline(always)]
- pub fn pin24(&self) -> PIN24_R {
- PIN24_R::new(((self.bits >> 24) & 0x01) != 0)
+ pub fn pin24(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 24,
+ }
}
#[doc = "Bit 25"]
#[inline(always)]
- pub fn pin25(&self) -> PIN25_R {
- PIN25_R::new(((self.bits >> 25) & 0x01) != 0)
+ pub fn pin25(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 25,
+ }
}
#[doc = "Bit 26"]
#[inline(always)]
- pub fn pin26(&self) -> PIN26_R {
- PIN26_R::new(((self.bits >> 26) & 0x01) != 0)
+ pub fn pin26(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 26,
+ }
}
#[doc = "Bit 27"]
#[inline(always)]
- pub fn pin27(&self) -> PIN27_R {
- PIN27_R::new(((self.bits >> 27) & 0x01) != 0)
+ pub fn pin27(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 27,
+ }
}
#[doc = "Bit 28"]
#[inline(always)]
- pub fn pin28(&self) -> PIN28_R {
- PIN28_R::new(((self.bits >> 28) & 0x01) != 0)
+ pub fn pin28(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 28,
+ }
}
#[doc = "Bit 29"]
#[inline(always)]
- pub fn pin29(&self) -> PIN29_R {
- PIN29_R::new(((self.bits >> 29) & 0x01) != 0)
+ pub fn pin29(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 29,
+ }
}
#[doc = "Bit 30"]
#[inline(always)]
- pub fn pin30(&self) -> PIN30_R {
- PIN30_R::new(((self.bits >> 30) & 0x01) != 0)
+ pub fn pin30(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 30,
+ }
}
#[doc = "Bit 31"]
#[inline(always)]
- pub fn pin31(&self) -> PIN31_R {
- PIN31_R::new(((self.bits >> 31) & 0x01) != 0)
+ pub fn pin31(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 31,
+ }
}
}
- impl W {
+ }
+ #[doc = "Pin Output Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [output_en](output_en) module"]
+ pub type OUTPUT_EN = crate::Reg;
+ #[allow(missing_docs)]
+ #[doc(hidden)]
+ pub struct _OUTPUT_EN;
+ #[doc = "`read()` method returns [output_en::R](output_en::R) reader structure"]
+ impl crate::Readable for OUTPUT_EN {}
+ #[doc = "`write(|w| ..)` method takes [output_en::W](output_en::W) writer structure"]
+ impl crate::Writable for OUTPUT_EN {}
+ #[doc = "Pin Output Enable Register"]
+ pub mod output_en {
+ #[doc = "Reader of register output_en"]
+ pub type R = crate::R;
+ #[doc = "Writer for register output_en"]
+ pub type W = crate::W;
+ #[doc = "Register output_en `reset()`'s with value 0"]
+ impl crate::ResetValue for super::OUTPUT_EN {
+ type Type = u32;
+ #[inline(always)]
+ fn reset_value() -> Self::Type {
+ 0
+ }
+ }
+ #[doc = "Reader of field `pin%s`"]
+ pub type PIN_R = crate::R;
+ #[doc = "Write proxy for fields `pin(0-31)`"]
+ pub struct PIN_W<'a> {
+ w: &'a mut W,
+ offset: usize,
+ }
+ impl<'a> PIN_W<'a> {
+ #[doc = r"Sets the field bit"]
+ #[inline(always)]
+ pub fn set_bit(self) -> &'a mut W {
+ self.bit(true)
+ }
+ #[doc = r"Clears the field bit"]
+ #[inline(always)]
+ pub fn clear_bit(self) -> &'a mut W {
+ self.bit(false)
+ }
+ #[doc = r"Writes raw bits to the field"]
+ #[inline(always)]
+ pub fn bit(self, value: bool) -> &'a mut W {
+ self.w.bits = (self.w.bits & !(0x01 << self.offset))
+ | (((value as u32) & 0x01) << self.offset);
+ self.w
+ }
+ }
+ impl R {
+ #[doc = ""]
+ #[inline(always)]
+ pub unsafe fn pin(&self, n: usize) -> PIN_R {
+ PIN_R::new(((self.bits >> n) & 0x01) != 0)
+ }
#[doc = "Bit 0"]
#[inline(always)]
- pub fn pin0(&mut self) -> PIN0_W {
- PIN0_W { w: self }
+ pub fn pin0(&self) -> PIN_R {
+ PIN_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1"]
#[inline(always)]
- pub fn pin1(&mut self) -> PIN1_W {
- PIN1_W { w: self }
+ pub fn pin1(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2"]
#[inline(always)]
- pub fn pin2(&mut self) -> PIN2_W {
- PIN2_W { w: self }
+ pub fn pin2(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3"]
#[inline(always)]
- pub fn pin3(&mut self) -> PIN3_W {
- PIN3_W { w: self }
+ pub fn pin3(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4"]
#[inline(always)]
- pub fn pin4(&mut self) -> PIN4_W {
- PIN4_W { w: self }
+ pub fn pin4(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5"]
#[inline(always)]
- pub fn pin5(&mut self) -> PIN5_W {
- PIN5_W { w: self }
+ pub fn pin5(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6"]
#[inline(always)]
- pub fn pin6(&mut self) -> PIN6_W {
- PIN6_W { w: self }
+ pub fn pin6(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7"]
#[inline(always)]
- pub fn pin7(&mut self) -> PIN7_W {
- PIN7_W { w: self }
+ pub fn pin7(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8"]
#[inline(always)]
- pub fn pin8(&mut self) -> PIN8_W {
- PIN8_W { w: self }
+ pub fn pin8(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9"]
#[inline(always)]
- pub fn pin9(&mut self) -> PIN9_W {
- PIN9_W { w: self }
+ pub fn pin9(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10"]
#[inline(always)]
- pub fn pin10(&mut self) -> PIN10_W {
- PIN10_W { w: self }
+ pub fn pin10(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11"]
#[inline(always)]
- pub fn pin11(&mut self) -> PIN11_W {
- PIN11_W { w: self }
+ pub fn pin11(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12"]
#[inline(always)]
- pub fn pin12(&mut self) -> PIN12_W {
- PIN12_W { w: self }
+ pub fn pin12(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13"]
#[inline(always)]
- pub fn pin13(&mut self) -> PIN13_W {
- PIN13_W { w: self }
+ pub fn pin13(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 14"]
#[inline(always)]
- pub fn pin14(&mut self) -> PIN14_W {
- PIN14_W { w: self }
+ pub fn pin14(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 15"]
#[inline(always)]
- pub fn pin15(&mut self) -> PIN15_W {
- PIN15_W { w: self }
+ pub fn pin15(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 16"]
#[inline(always)]
- pub fn pin16(&mut self) -> PIN16_W {
- PIN16_W { w: self }
+ pub fn pin16(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 17"]
#[inline(always)]
- pub fn pin17(&mut self) -> PIN17_W {
- PIN17_W { w: self }
+ pub fn pin17(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 18"]
#[inline(always)]
- pub fn pin18(&mut self) -> PIN18_W {
- PIN18_W { w: self }
+ pub fn pin18(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 19"]
#[inline(always)]
- pub fn pin19(&mut self) -> PIN19_W {
- PIN19_W { w: self }
+ pub fn pin19(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 20"]
#[inline(always)]
- pub fn pin20(&mut self) -> PIN20_W {
- PIN20_W { w: self }
+ pub fn pin20(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 20) & 0x01) != 0)
}
#[doc = "Bit 21"]
#[inline(always)]
- pub fn pin21(&mut self) -> PIN21_W {
- PIN21_W { w: self }
+ pub fn pin21(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 21) & 0x01) != 0)
}
#[doc = "Bit 22"]
#[inline(always)]
- pub fn pin22(&mut self) -> PIN22_W {
- PIN22_W { w: self }
+ pub fn pin22(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 22) & 0x01) != 0)
}
#[doc = "Bit 23"]
#[inline(always)]
- pub fn pin23(&mut self) -> PIN23_W {
- PIN23_W { w: self }
+ pub fn pin23(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 23) & 0x01) != 0)
}
#[doc = "Bit 24"]
#[inline(always)]
- pub fn pin24(&mut self) -> PIN24_W {
- PIN24_W { w: self }
+ pub fn pin24(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 24) & 0x01) != 0)
}
#[doc = "Bit 25"]
#[inline(always)]
- pub fn pin25(&mut self) -> PIN25_W {
- PIN25_W { w: self }
+ pub fn pin25(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 25) & 0x01) != 0)
}
#[doc = "Bit 26"]
#[inline(always)]
- pub fn pin26(&mut self) -> PIN26_W {
- PIN26_W { w: self }
+ pub fn pin26(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 26) & 0x01) != 0)
}
#[doc = "Bit 27"]
#[inline(always)]
- pub fn pin27(&mut self) -> PIN27_W {
- PIN27_W { w: self }
+ pub fn pin27(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 27) & 0x01) != 0)
}
#[doc = "Bit 28"]
#[inline(always)]
- pub fn pin28(&mut self) -> PIN28_W {
- PIN28_W { w: self }
+ pub fn pin28(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 28) & 0x01) != 0)
}
#[doc = "Bit 29"]
#[inline(always)]
- pub fn pin29(&mut self) -> PIN29_W {
- PIN29_W { w: self }
+ pub fn pin29(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 29) & 0x01) != 0)
}
#[doc = "Bit 30"]
#[inline(always)]
- pub fn pin30(&mut self) -> PIN30_W {
- PIN30_W { w: self }
+ pub fn pin30(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 30) & 0x01) != 0)
}
#[doc = "Bit 31"]
#[inline(always)]
- pub fn pin31(&mut self) -> PIN31_W {
- PIN31_W { w: self }
+ pub fn pin31(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 31) & 0x01) != 0)
}
}
- }
- #[doc = "Pin Input Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [input_en](input_en) module"]
- pub type INPUT_EN = crate::Reg;
- #[allow(missing_docs)]
- #[doc(hidden)]
- pub struct _INPUT_EN;
- #[doc = "`read()` method returns [input_en::R](input_en::R) reader structure"]
- impl crate::Readable for INPUT_EN {}
- #[doc = "`write(|w| ..)` method takes [input_en::W](input_en::W) writer structure"]
- impl crate::Writable for INPUT_EN {}
- #[doc = "Pin Input Enable Register"]
- pub mod input_en {
- #[doc = "Reader of register input_en"]
- pub type R = crate::R;
- #[doc = "Writer for register input_en"]
- pub type W = crate::W;
- #[doc = "Register input_en `reset()`'s with value 0"]
- impl crate::ResetValue for super::INPUT_EN {
- type Type = u32;
+ impl W {
+ #[doc = ""]
#[inline(always)]
- fn reset_value() -> Self::Type {
- 0
+ pub unsafe fn pin(&mut self, n: usize) -> PIN_W {
+ PIN_W { w: self, offset: n }
}
- }
- #[doc = "Reader of field `pin0`"]
- pub type PIN0_R = crate::R;
- #[doc = "Write proxy for field `pin0`"]
- pub struct PIN0_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN0_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin0(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 0 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin1(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 1 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 2"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
- self.w
+ pub fn pin2(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 2 }
}
- }
- #[doc = "Reader of field `pin1`"]
- pub type PIN1_R = crate::R;
- #[doc = "Write proxy for field `pin1`"]
- pub struct PIN1_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN1_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 3"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin3(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 3 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 4"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin4(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 4 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 5"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
- self.w
+ pub fn pin5(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 5 }
}
- }
- #[doc = "Reader of field `pin2`"]
- pub type PIN2_R = crate::R;
- #[doc = "Write proxy for field `pin2`"]
- pub struct PIN2_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN2_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 6"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin6(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 6 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 7"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin7(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 7 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 8"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
- self.w
+ pub fn pin8(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 8 }
}
- }
- #[doc = "Reader of field `pin3`"]
- pub type PIN3_R = crate::R;
- #[doc = "Write proxy for field `pin3`"]
- pub struct PIN3_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN3_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 9"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin9(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 9 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 10"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin10(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 10,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 11"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
- self.w
+ pub fn pin11(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 11,
+ }
}
- }
- #[doc = "Reader of field `pin4`"]
- pub type PIN4_R = crate::R;
- #[doc = "Write proxy for field `pin4`"]
- pub struct PIN4_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN4_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 12"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin12(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 12,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 13"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin13(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 13,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 14"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
- self.w
+ pub fn pin14(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 14,
+ }
}
- }
- #[doc = "Reader of field `pin5`"]
- pub type PIN5_R = crate::R;
- #[doc = "Write proxy for field `pin5`"]
- pub struct PIN5_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN5_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 15"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin15(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 15,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 16"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin16(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 16,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 17"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
- self.w
+ pub fn pin17(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 17,
+ }
}
- }
- #[doc = "Reader of field `pin6`"]
- pub type PIN6_R = crate::R;
- #[doc = "Write proxy for field `pin6`"]
- pub struct PIN6_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN6_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 18"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin18(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 18,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 19"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin19(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 19,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 20"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
- self.w
+ pub fn pin20(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 20,
+ }
}
- }
- #[doc = "Reader of field `pin7`"]
- pub type PIN7_R = crate::R;
- #[doc = "Write proxy for field `pin7`"]
- pub struct PIN7_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN7_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 21"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin21(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 21,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 22"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin22(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 22,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 23"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
- self.w
+ pub fn pin23(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 23,
+ }
}
- }
- #[doc = "Reader of field `pin8`"]
- pub type PIN8_R = crate::R;
- #[doc = "Write proxy for field `pin8`"]
- pub struct PIN8_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN8_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 24"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin24(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 24,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 25"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin25(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 25,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 26"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
- self.w
+ pub fn pin26(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 26,
+ }
}
- }
- #[doc = "Reader of field `pin9`"]
- pub type PIN9_R = crate::R;
- #[doc = "Write proxy for field `pin9`"]
- pub struct PIN9_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN9_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 27"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin27(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 27,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 28"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin28(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 28,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 29"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
- self.w
+ pub fn pin29(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 29,
+ }
}
- }
- #[doc = "Reader of field `pin10`"]
- pub type PIN10_R = crate::R;
- #[doc = "Write proxy for field `pin10`"]
- pub struct PIN10_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN10_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 30"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin30(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 30,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 31"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin31(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 31,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ }
+ }
+ #[doc = "Output Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [output_val](output_val) module"]
+ pub type OUTPUT_VAL = crate::Reg;
+ #[allow(missing_docs)]
+ #[doc(hidden)]
+ pub struct _OUTPUT_VAL;
+ #[doc = "`read()` method returns [output_val::R](output_val::R) reader structure"]
+ impl crate::Readable for OUTPUT_VAL {}
+ #[doc = "`write(|w| ..)` method takes [output_val::W](output_val::W) writer structure"]
+ impl crate::Writable for OUTPUT_VAL {}
+ #[doc = "Output Value Register"]
+ pub mod output_val {
+ #[doc = "Reader of register output_val"]
+ pub type R = crate::R;
+ #[doc = "Writer for register output_val"]
+ pub type W = crate::W;
+ #[doc = "Register output_val `reset()`'s with value 0"]
+ impl crate::ResetValue for super::OUTPUT_VAL {
+ type Type = u32;
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
- self.w
+ fn reset_value() -> Self::Type {
+ 0
}
}
- #[doc = "Reader of field `pin11`"]
- pub type PIN11_R = crate::R;
- #[doc = "Write proxy for field `pin11`"]
- pub struct PIN11_W<'a> {
+ #[doc = "Reader of field `pin%s`"]
+ pub type PIN_R = crate::R;
+ #[doc = "Write proxy for fields `pin(0-31)`"]
+ pub struct PIN_W<'a> {
w: &'a mut W,
+ offset: usize,
}
- impl<'a> PIN11_W<'a> {
+ impl<'a> PIN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
@@ -3211,473 +3141,443 @@ pub mod gpiohs {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
+ self.w.bits = (self.w.bits & !(0x01 << self.offset))
+ | (((value as u32) & 0x01) << self.offset);
self.w
}
}
- #[doc = "Reader of field `pin12`"]
- pub type PIN12_R = crate::R;
- #[doc = "Write proxy for field `pin12`"]
- pub struct PIN12_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN12_W<'a> {
- #[doc = r"Sets the field bit"]
+ impl R {
+ #[doc = ""]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub unsafe fn pin(&self, n: usize) -> PIN_R {
+ PIN_R::new(((self.bits >> n) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin0(&self) -> PIN_R {
+ PIN_R::new((self.bits & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
- self.w
+ pub fn pin1(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 1) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin13`"]
- pub type PIN13_R = crate::R;
- #[doc = "Write proxy for field `pin13`"]
- pub struct PIN13_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN13_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 2"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin2(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 2) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 3"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin3(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 3) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 4"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13);
- self.w
+ pub fn pin4(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 4) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin14`"]
- pub type PIN14_R = crate::R;
- #[doc = "Write proxy for field `pin14`"]
- pub struct PIN14_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN14_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 5"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin5(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 5) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 6"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin6(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 6) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 7"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
- self.w
+ pub fn pin7(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 7) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin15`"]
- pub type PIN15_R = crate::R;
- #[doc = "Write proxy for field `pin15`"]
- pub struct PIN15_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN15_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 8"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin8(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 8) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 9"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin9(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 9) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 10"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
- self.w
+ pub fn pin10(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 10) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin16`"]
- pub type PIN16_R = crate::R;
- #[doc = "Write proxy for field `pin16`"]
- pub struct PIN16_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN16_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 11"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin11(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 11) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 12"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin12(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 12) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 13"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
- self.w
+ pub fn pin13(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 13) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin17`"]
- pub type PIN17_R = crate::R;
- #[doc = "Write proxy for field `pin17`"]
- pub struct PIN17_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN17_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 14"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin14(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 14) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 15"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin15(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 15) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 16"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17);
- self.w
+ pub fn pin16(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 16) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin18`"]
- pub type PIN18_R = crate::R;
- #[doc = "Write proxy for field `pin18`"]
- pub struct PIN18_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN18_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 17"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin17(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 17) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 18"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin18(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 18) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 19"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18);
- self.w
+ pub fn pin19(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 19) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin19`"]
- pub type PIN19_R = crate::R;
- #[doc = "Write proxy for field `pin19`"]
- pub struct PIN19_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN19_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 20"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin20(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 20) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 21"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin21(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 21) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 22"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19);
- self.w
+ pub fn pin22(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 22) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin20`"]
- pub type PIN20_R = crate::R;
- #[doc = "Write proxy for field `pin20`"]
- pub struct PIN20_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN20_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 23"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin23(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 23) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 24"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin24(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 24) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 25"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20);
- self.w
+ pub fn pin25(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 25) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin21`"]
- pub type PIN21_R = crate::R;
- #[doc = "Write proxy for field `pin21`"]
- pub struct PIN21_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN21_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 26"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin26(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 26) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 27"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin27(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 27) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 28"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21);
- self.w
+ pub fn pin28(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 28) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin22`"]
- pub type PIN22_R = crate::R;
- #[doc = "Write proxy for field `pin22`"]
- pub struct PIN22_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN22_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 29"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin29(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 29) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 30"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin30(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 30) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 31"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22);
- self.w
+ pub fn pin31(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 31) & 0x01) != 0)
}
}
- #[doc = "Reader of field `pin23`"]
- pub type PIN23_R = crate::R;
- #[doc = "Write proxy for field `pin23`"]
- pub struct PIN23_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN23_W<'a> {
- #[doc = r"Sets the field bit"]
+ impl W {
+ #[doc = ""]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub unsafe fn pin(&mut self, n: usize) -> PIN_W {
+ PIN_W { w: self, offset: n }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin0(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 0 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23);
- self.w
+ pub fn pin1(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 1 }
}
- }
- #[doc = "Reader of field `pin24`"]
- pub type PIN24_R = crate::R;
- #[doc = "Write proxy for field `pin24`"]
- pub struct PIN24_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN24_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 2"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin2(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 2 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 3"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin3(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 3 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 4"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24);
- self.w
+ pub fn pin4(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 4 }
}
- }
- #[doc = "Reader of field `pin25`"]
- pub type PIN25_R = crate::R;
- #[doc = "Write proxy for field `pin25`"]
- pub struct PIN25_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN25_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 5"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin5(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 5 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 6"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin6(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 6 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 7"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25);
- self.w
+ pub fn pin7(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 7 }
}
- }
- #[doc = "Reader of field `pin26`"]
- pub type PIN26_R = crate::R;
- #[doc = "Write proxy for field `pin26`"]
- pub struct PIN26_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN26_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 8"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin8(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 8 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 9"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin9(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 9 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 10"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26);
- self.w
+ pub fn pin10(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 10,
+ }
}
- }
- #[doc = "Reader of field `pin27`"]
- pub type PIN27_R = crate::R;
- #[doc = "Write proxy for field `pin27`"]
- pub struct PIN27_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN27_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 11"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin11(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 11,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 12"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin12(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 12,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 13"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27);
- self.w
+ pub fn pin13(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 13,
+ }
}
- }
- #[doc = "Reader of field `pin28`"]
- pub type PIN28_R = crate::R;
- #[doc = "Write proxy for field `pin28`"]
- pub struct PIN28_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN28_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 14"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin14(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 14,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 15"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin15(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 15,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 16"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28);
- self.w
+ pub fn pin16(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 16,
+ }
}
- }
- #[doc = "Reader of field `pin29`"]
- pub type PIN29_R = crate::R;
- #[doc = "Write proxy for field `pin29`"]
- pub struct PIN29_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN29_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 17"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin17(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 17,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 18"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin18(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 18,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 19"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29);
- self.w
+ pub fn pin19(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 19,
+ }
}
- }
- #[doc = "Reader of field `pin30`"]
- pub type PIN30_R = crate::R;
- #[doc = "Write proxy for field `pin30`"]
- pub struct PIN30_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN30_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 20"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin20(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 20,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 21"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin21(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 21,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 22"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30);
- self.w
+ pub fn pin22(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 22,
+ }
+ }
+ #[doc = "Bit 23"]
+ #[inline(always)]
+ pub fn pin23(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 23,
+ }
+ }
+ #[doc = "Bit 24"]
+ #[inline(always)]
+ pub fn pin24(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 24,
+ }
+ }
+ #[doc = "Bit 25"]
+ #[inline(always)]
+ pub fn pin25(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 25,
+ }
+ }
+ #[doc = "Bit 26"]
+ #[inline(always)]
+ pub fn pin26(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 26,
+ }
+ }
+ #[doc = "Bit 27"]
+ #[inline(always)]
+ pub fn pin27(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 27,
+ }
+ }
+ #[doc = "Bit 28"]
+ #[inline(always)]
+ pub fn pin28(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 28,
+ }
+ }
+ #[doc = "Bit 29"]
+ #[inline(always)]
+ pub fn pin29(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 29,
+ }
+ }
+ #[doc = "Bit 30"]
+ #[inline(always)]
+ pub fn pin30(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 30,
+ }
+ }
+ #[doc = "Bit 31"]
+ #[inline(always)]
+ pub fn pin31(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 31,
+ }
+ }
+ }
+ }
+ #[doc = "Internal Pull-Up Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pullup_en](pullup_en) module"]
+ pub type PULLUP_EN = crate::Reg;
+ #[allow(missing_docs)]
+ #[doc(hidden)]
+ pub struct _PULLUP_EN;
+ #[doc = "`read()` method returns [pullup_en::R](pullup_en::R) reader structure"]
+ impl crate::Readable for PULLUP_EN {}
+ #[doc = "`write(|w| ..)` method takes [pullup_en::W](pullup_en::W) writer structure"]
+ impl crate::Writable for PULLUP_EN {}
+ #[doc = "Internal Pull-Up Enable Register"]
+ pub mod pullup_en {
+ #[doc = "Reader of register pullup_en"]
+ pub type R = crate::R;
+ #[doc = "Writer for register pullup_en"]
+ pub type W = crate::W;
+ #[doc = "Register pullup_en `reset()`'s with value 0"]
+ impl crate::ResetValue for super::PULLUP_EN {
+ type Type = u32;
+ #[inline(always)]
+ fn reset_value() -> Self::Type {
+ 0
}
}
- #[doc = "Reader of field `pin31`"]
- pub type PIN31_R = crate::R;
- #[doc = "Write proxy for field `pin31`"]
- pub struct PIN31_W<'a> {
+ #[doc = "Reader of field `pin%s`"]
+ pub type PIN_R = crate::R;
+ #[doc = "Write proxy for fields `pin(0-31)`"]
+ pub struct PIN_W<'a> {
w: &'a mut W,
+ offset: usize,
}
- impl<'a> PIN31_W<'a> {
+ impl<'a> PIN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
@@ -3691,365 +3591,443 @@ pub mod gpiohs {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31);
+ self.w.bits = (self.w.bits & !(0x01 << self.offset))
+ | (((value as u32) & 0x01) << self.offset);
self.w
}
}
impl R {
+ #[doc = ""]
+ #[inline(always)]
+ pub unsafe fn pin(&self, n: usize) -> PIN_R {
+ PIN_R::new(((self.bits >> n) & 0x01) != 0)
+ }
#[doc = "Bit 0"]
#[inline(always)]
- pub fn pin0(&self) -> PIN0_R {
- PIN0_R::new((self.bits & 0x01) != 0)
+ pub fn pin0(&self) -> PIN_R {
+ PIN_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1"]
#[inline(always)]
- pub fn pin1(&self) -> PIN1_R {
- PIN1_R::new(((self.bits >> 1) & 0x01) != 0)
+ pub fn pin1(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2"]
#[inline(always)]
- pub fn pin2(&self) -> PIN2_R {
- PIN2_R::new(((self.bits >> 2) & 0x01) != 0)
+ pub fn pin2(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3"]
#[inline(always)]
- pub fn pin3(&self) -> PIN3_R {
- PIN3_R::new(((self.bits >> 3) & 0x01) != 0)
+ pub fn pin3(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4"]
#[inline(always)]
- pub fn pin4(&self) -> PIN4_R {
- PIN4_R::new(((self.bits >> 4) & 0x01) != 0)
+ pub fn pin4(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5"]
#[inline(always)]
- pub fn pin5(&self) -> PIN5_R {
- PIN5_R::new(((self.bits >> 5) & 0x01) != 0)
+ pub fn pin5(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6"]
#[inline(always)]
- pub fn pin6(&self) -> PIN6_R {
- PIN6_R::new(((self.bits >> 6) & 0x01) != 0)
+ pub fn pin6(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7"]
#[inline(always)]
- pub fn pin7(&self) -> PIN7_R {
- PIN7_R::new(((self.bits >> 7) & 0x01) != 0)
+ pub fn pin7(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8"]
#[inline(always)]
- pub fn pin8(&self) -> PIN8_R {
- PIN8_R::new(((self.bits >> 8) & 0x01) != 0)
+ pub fn pin8(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9"]
#[inline(always)]
- pub fn pin9(&self) -> PIN9_R {
- PIN9_R::new(((self.bits >> 9) & 0x01) != 0)
+ pub fn pin9(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10"]
#[inline(always)]
- pub fn pin10(&self) -> PIN10_R {
- PIN10_R::new(((self.bits >> 10) & 0x01) != 0)
+ pub fn pin10(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11"]
#[inline(always)]
- pub fn pin11(&self) -> PIN11_R {
- PIN11_R::new(((self.bits >> 11) & 0x01) != 0)
+ pub fn pin11(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12"]
#[inline(always)]
- pub fn pin12(&self) -> PIN12_R {
- PIN12_R::new(((self.bits >> 12) & 0x01) != 0)
+ pub fn pin12(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13"]
#[inline(always)]
- pub fn pin13(&self) -> PIN13_R {
- PIN13_R::new(((self.bits >> 13) & 0x01) != 0)
+ pub fn pin13(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 14"]
#[inline(always)]
- pub fn pin14(&self) -> PIN14_R {
- PIN14_R::new(((self.bits >> 14) & 0x01) != 0)
+ pub fn pin14(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 15"]
#[inline(always)]
- pub fn pin15(&self) -> PIN15_R {
- PIN15_R::new(((self.bits >> 15) & 0x01) != 0)
+ pub fn pin15(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 16"]
#[inline(always)]
- pub fn pin16(&self) -> PIN16_R {
- PIN16_R::new(((self.bits >> 16) & 0x01) != 0)
+ pub fn pin16(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 17"]
#[inline(always)]
- pub fn pin17(&self) -> PIN17_R {
- PIN17_R::new(((self.bits >> 17) & 0x01) != 0)
+ pub fn pin17(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 18"]
#[inline(always)]
- pub fn pin18(&self) -> PIN18_R {
- PIN18_R::new(((self.bits >> 18) & 0x01) != 0)
+ pub fn pin18(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 19"]
#[inline(always)]
- pub fn pin19(&self) -> PIN19_R {
- PIN19_R::new(((self.bits >> 19) & 0x01) != 0)
+ pub fn pin19(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 20"]
#[inline(always)]
- pub fn pin20(&self) -> PIN20_R {
- PIN20_R::new(((self.bits >> 20) & 0x01) != 0)
+ pub fn pin20(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 20) & 0x01) != 0)
}
#[doc = "Bit 21"]
#[inline(always)]
- pub fn pin21(&self) -> PIN21_R {
- PIN21_R::new(((self.bits >> 21) & 0x01) != 0)
+ pub fn pin21(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 21) & 0x01) != 0)
}
#[doc = "Bit 22"]
#[inline(always)]
- pub fn pin22(&self) -> PIN22_R {
- PIN22_R::new(((self.bits >> 22) & 0x01) != 0)
+ pub fn pin22(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 22) & 0x01) != 0)
}
#[doc = "Bit 23"]
#[inline(always)]
- pub fn pin23(&self) -> PIN23_R {
- PIN23_R::new(((self.bits >> 23) & 0x01) != 0)
+ pub fn pin23(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 23) & 0x01) != 0)
}
#[doc = "Bit 24"]
#[inline(always)]
- pub fn pin24(&self) -> PIN24_R {
- PIN24_R::new(((self.bits >> 24) & 0x01) != 0)
+ pub fn pin24(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 24) & 0x01) != 0)
}
#[doc = "Bit 25"]
#[inline(always)]
- pub fn pin25(&self) -> PIN25_R {
- PIN25_R::new(((self.bits >> 25) & 0x01) != 0)
+ pub fn pin25(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 25) & 0x01) != 0)
}
#[doc = "Bit 26"]
#[inline(always)]
- pub fn pin26(&self) -> PIN26_R {
- PIN26_R::new(((self.bits >> 26) & 0x01) != 0)
+ pub fn pin26(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 26) & 0x01) != 0)
}
#[doc = "Bit 27"]
#[inline(always)]
- pub fn pin27(&self) -> PIN27_R {
- PIN27_R::new(((self.bits >> 27) & 0x01) != 0)
+ pub fn pin27(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 27) & 0x01) != 0)
}
#[doc = "Bit 28"]
#[inline(always)]
- pub fn pin28(&self) -> PIN28_R {
- PIN28_R::new(((self.bits >> 28) & 0x01) != 0)
+ pub fn pin28(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 28) & 0x01) != 0)
}
#[doc = "Bit 29"]
#[inline(always)]
- pub fn pin29(&self) -> PIN29_R {
- PIN29_R::new(((self.bits >> 29) & 0x01) != 0)
+ pub fn pin29(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 29) & 0x01) != 0)
}
#[doc = "Bit 30"]
#[inline(always)]
- pub fn pin30(&self) -> PIN30_R {
- PIN30_R::new(((self.bits >> 30) & 0x01) != 0)
+ pub fn pin30(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 30) & 0x01) != 0)
}
#[doc = "Bit 31"]
#[inline(always)]
- pub fn pin31(&self) -> PIN31_R {
- PIN31_R::new(((self.bits >> 31) & 0x01) != 0)
+ pub fn pin31(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 31) & 0x01) != 0)
}
}
impl W {
+ #[doc = ""]
+ #[inline(always)]
+ pub unsafe fn pin(&mut self, n: usize) -> PIN_W {
+ PIN_W { w: self, offset: n }
+ }
#[doc = "Bit 0"]
#[inline(always)]
- pub fn pin0(&mut self) -> PIN0_W {
- PIN0_W { w: self }
+ pub fn pin0(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 0 }
}
#[doc = "Bit 1"]
#[inline(always)]
- pub fn pin1(&mut self) -> PIN1_W {
- PIN1_W { w: self }
+ pub fn pin1(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 1 }
}
#[doc = "Bit 2"]
#[inline(always)]
- pub fn pin2(&mut self) -> PIN2_W {
- PIN2_W { w: self }
+ pub fn pin2(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 2 }
}
#[doc = "Bit 3"]
#[inline(always)]
- pub fn pin3(&mut self) -> PIN3_W {
- PIN3_W { w: self }
+ pub fn pin3(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 3 }
}
#[doc = "Bit 4"]
#[inline(always)]
- pub fn pin4(&mut self) -> PIN4_W {
- PIN4_W { w: self }
+ pub fn pin4(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 4 }
}
#[doc = "Bit 5"]
#[inline(always)]
- pub fn pin5(&mut self) -> PIN5_W {
- PIN5_W { w: self }
+ pub fn pin5(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 5 }
}
#[doc = "Bit 6"]
#[inline(always)]
- pub fn pin6(&mut self) -> PIN6_W {
- PIN6_W { w: self }
+ pub fn pin6(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 6 }
}
#[doc = "Bit 7"]
#[inline(always)]
- pub fn pin7(&mut self) -> PIN7_W {
- PIN7_W { w: self }
+ pub fn pin7(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 7 }
}
#[doc = "Bit 8"]
#[inline(always)]
- pub fn pin8(&mut self) -> PIN8_W {
- PIN8_W { w: self }
+ pub fn pin8(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 8 }
}
#[doc = "Bit 9"]
#[inline(always)]
- pub fn pin9(&mut self) -> PIN9_W {
- PIN9_W { w: self }
+ pub fn pin9(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 9 }
}
#[doc = "Bit 10"]
#[inline(always)]
- pub fn pin10(&mut self) -> PIN10_W {
- PIN10_W { w: self }
+ pub fn pin10(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 10,
+ }
}
#[doc = "Bit 11"]
#[inline(always)]
- pub fn pin11(&mut self) -> PIN11_W {
- PIN11_W { w: self }
+ pub fn pin11(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 11,
+ }
}
#[doc = "Bit 12"]
#[inline(always)]
- pub fn pin12(&mut self) -> PIN12_W {
- PIN12_W { w: self }
+ pub fn pin12(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 12,
+ }
}
#[doc = "Bit 13"]
#[inline(always)]
- pub fn pin13(&mut self) -> PIN13_W {
- PIN13_W { w: self }
+ pub fn pin13(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 13,
+ }
}
#[doc = "Bit 14"]
#[inline(always)]
- pub fn pin14(&mut self) -> PIN14_W {
- PIN14_W { w: self }
+ pub fn pin14(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 14,
+ }
}
#[doc = "Bit 15"]
#[inline(always)]
- pub fn pin15(&mut self) -> PIN15_W {
- PIN15_W { w: self }
+ pub fn pin15(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 15,
+ }
}
#[doc = "Bit 16"]
#[inline(always)]
- pub fn pin16(&mut self) -> PIN16_W {
- PIN16_W { w: self }
+ pub fn pin16(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 16,
+ }
}
#[doc = "Bit 17"]
#[inline(always)]
- pub fn pin17(&mut self) -> PIN17_W {
- PIN17_W { w: self }
+ pub fn pin17(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 17,
+ }
}
#[doc = "Bit 18"]
#[inline(always)]
- pub fn pin18(&mut self) -> PIN18_W {
- PIN18_W { w: self }
+ pub fn pin18(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 18,
+ }
}
#[doc = "Bit 19"]
#[inline(always)]
- pub fn pin19(&mut self) -> PIN19_W {
- PIN19_W { w: self }
+ pub fn pin19(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 19,
+ }
}
#[doc = "Bit 20"]
#[inline(always)]
- pub fn pin20(&mut self) -> PIN20_W {
- PIN20_W { w: self }
+ pub fn pin20(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 20,
+ }
}
#[doc = "Bit 21"]
#[inline(always)]
- pub fn pin21(&mut self) -> PIN21_W {
- PIN21_W { w: self }
+ pub fn pin21(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 21,
+ }
}
#[doc = "Bit 22"]
#[inline(always)]
- pub fn pin22(&mut self) -> PIN22_W {
- PIN22_W { w: self }
+ pub fn pin22(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 22,
+ }
}
#[doc = "Bit 23"]
#[inline(always)]
- pub fn pin23(&mut self) -> PIN23_W {
- PIN23_W { w: self }
+ pub fn pin23(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 23,
+ }
}
#[doc = "Bit 24"]
#[inline(always)]
- pub fn pin24(&mut self) -> PIN24_W {
- PIN24_W { w: self }
+ pub fn pin24(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 24,
+ }
}
#[doc = "Bit 25"]
#[inline(always)]
- pub fn pin25(&mut self) -> PIN25_W {
- PIN25_W { w: self }
+ pub fn pin25(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 25,
+ }
}
#[doc = "Bit 26"]
#[inline(always)]
- pub fn pin26(&mut self) -> PIN26_W {
- PIN26_W { w: self }
+ pub fn pin26(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 26,
+ }
}
#[doc = "Bit 27"]
#[inline(always)]
- pub fn pin27(&mut self) -> PIN27_W {
- PIN27_W { w: self }
+ pub fn pin27(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 27,
+ }
}
#[doc = "Bit 28"]
#[inline(always)]
- pub fn pin28(&mut self) -> PIN28_W {
- PIN28_W { w: self }
+ pub fn pin28(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 28,
+ }
}
#[doc = "Bit 29"]
#[inline(always)]
- pub fn pin29(&mut self) -> PIN29_W {
- PIN29_W { w: self }
+ pub fn pin29(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 29,
+ }
}
#[doc = "Bit 30"]
#[inline(always)]
- pub fn pin30(&mut self) -> PIN30_W {
- PIN30_W { w: self }
+ pub fn pin30(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 30,
+ }
}
#[doc = "Bit 31"]
#[inline(always)]
- pub fn pin31(&mut self) -> PIN31_W {
- PIN31_W { w: self }
+ pub fn pin31(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 31,
+ }
}
}
}
- #[doc = "Pin Output Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [output_en](output_en) module"]
- pub type OUTPUT_EN = crate::Reg;
+ #[doc = "Drive Strength Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [drive](drive) module"]
+ pub type DRIVE = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
- pub struct _OUTPUT_EN;
- #[doc = "`read()` method returns [output_en::R](output_en::R) reader structure"]
- impl crate::Readable for OUTPUT_EN {}
- #[doc = "`write(|w| ..)` method takes [output_en::W](output_en::W) writer structure"]
- impl crate::Writable for OUTPUT_EN {}
- #[doc = "Pin Output Enable Register"]
- pub mod output_en {
- #[doc = "Reader of register output_en"]
- pub type R = crate::R;
- #[doc = "Writer for register output_en"]
- pub type W = crate::W;
- #[doc = "Register output_en `reset()`'s with value 0"]
- impl crate::ResetValue for super::OUTPUT_EN {
+ pub struct _DRIVE;
+ #[doc = "`read()` method returns [drive::R](drive::R) reader structure"]
+ impl crate::Readable for DRIVE {}
+ #[doc = "`write(|w| ..)` method takes [drive::W](drive::W) writer structure"]
+ impl crate::Writable for DRIVE {}
+ #[doc = "Drive Strength Register"]
+ pub mod drive {
+ #[doc = "Reader of register drive"]
+ pub type R = crate::R;
+ #[doc = "Writer for register drive"]
+ pub type W = crate::W;
+ #[doc = "Register drive `reset()`'s with value 0"]
+ impl crate::ResetValue for super::DRIVE {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
- #[doc = "Reader of field `pin0`"]
- pub type PIN0_R = crate::R;
- #[doc = "Write proxy for field `pin0`"]
- pub struct PIN0_W<'a> {
+ #[doc = "Reader of field `pin%s`"]
+ pub type PIN_R = crate::R;
+ #[doc = "Write proxy for fields `pin(0-31)`"]
+ pub struct PIN_W<'a> {
w: &'a mut W,
+ offset: usize,
}
- impl<'a> PIN0_W<'a> {
+ impl<'a> PIN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
@@ -4063,545 +4041,443 @@ pub mod gpiohs {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
+ self.w.bits = (self.w.bits & !(0x01 << self.offset))
+ | (((value as u32) & 0x01) << self.offset);
self.w
}
}
- #[doc = "Reader of field `pin1`"]
- pub type PIN1_R = crate::R;
- #[doc = "Write proxy for field `pin1`"]
- pub struct PIN1_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN1_W<'a> {
- #[doc = r"Sets the field bit"]
+ impl R {
+ #[doc = ""]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub unsafe fn pin(&self, n: usize) -> PIN_R {
+ PIN_R::new(((self.bits >> n) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin0(&self) -> PIN_R {
+ PIN_R::new((self.bits & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
- self.w
+ pub fn pin1(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 1) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin2`"]
- pub type PIN2_R = crate::R;
- #[doc = "Write proxy for field `pin2`"]
- pub struct PIN2_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN2_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 2"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin2(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 2) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 3"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin3(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 3) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 4"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
- self.w
+ pub fn pin4(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 4) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin3`"]
- pub type PIN3_R = crate::R;
- #[doc = "Write proxy for field `pin3`"]
- pub struct PIN3_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN3_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 5"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin5(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 5) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 6"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin6(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 6) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 7"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
- self.w
+ pub fn pin7(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 7) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin4`"]
- pub type PIN4_R = crate::R;
- #[doc = "Write proxy for field `pin4`"]
- pub struct PIN4_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN4_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 8"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin8(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 8) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 9"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin9(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 9) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 10"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
- self.w
+ pub fn pin10(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 10) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin5`"]
- pub type PIN5_R = crate::R;
- #[doc = "Write proxy for field `pin5`"]
- pub struct PIN5_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN5_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 11"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin11(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 11) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 12"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin12(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 12) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 13"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
- self.w
+ pub fn pin13(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 13) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin6`"]
- pub type PIN6_R = crate::R;
- #[doc = "Write proxy for field `pin6`"]
- pub struct PIN6_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN6_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 14"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin14(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 14) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 15"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin15(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 15) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 16"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
- self.w
+ pub fn pin16(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 16) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin7`"]
- pub type PIN7_R = crate::R;
- #[doc = "Write proxy for field `pin7`"]
- pub struct PIN7_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN7_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 17"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin17(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 17) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 18"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin18(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 18) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 19"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
- self.w
+ pub fn pin19(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 19) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin8`"]
- pub type PIN8_R = crate::R;
- #[doc = "Write proxy for field `pin8`"]
- pub struct PIN8_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN8_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 20"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin20(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 20) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 21"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin21(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 21) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 22"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
- self.w
+ pub fn pin22(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 22) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin9`"]
- pub type PIN9_R = crate::R;
- #[doc = "Write proxy for field `pin9`"]
- pub struct PIN9_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN9_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 23"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin23(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 23) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 24"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin24(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 24) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 25"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
- self.w
+ pub fn pin25(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 25) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin10`"]
- pub type PIN10_R = crate::R;
- #[doc = "Write proxy for field `pin10`"]
- pub struct PIN10_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN10_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 26"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin26(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 26) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 27"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin27(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 27) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 28"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
- self.w
+ pub fn pin28(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 28) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin11`"]
- pub type PIN11_R = crate::R;
- #[doc = "Write proxy for field `pin11`"]
- pub struct PIN11_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN11_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 29"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin29(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 29) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 30"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin30(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 30) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 31"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
- self.w
+ pub fn pin31(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 31) & 0x01) != 0)
}
}
- #[doc = "Reader of field `pin12`"]
- pub type PIN12_R = crate::R;
- #[doc = "Write proxy for field `pin12`"]
- pub struct PIN12_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN12_W<'a> {
- #[doc = r"Sets the field bit"]
+ impl W {
+ #[doc = ""]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub unsafe fn pin(&mut self, n: usize) -> PIN_W {
+ PIN_W { w: self, offset: n }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin0(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 0 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
- self.w
+ pub fn pin1(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 1 }
}
- }
- #[doc = "Reader of field `pin13`"]
- pub type PIN13_R = crate::R;
- #[doc = "Write proxy for field `pin13`"]
- pub struct PIN13_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN13_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 2"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin2(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 2 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 3"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin3(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 3 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 4"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13);
- self.w
+ pub fn pin4(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 4 }
}
- }
- #[doc = "Reader of field `pin14`"]
- pub type PIN14_R = crate::R;
- #[doc = "Write proxy for field `pin14`"]
- pub struct PIN14_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN14_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 5"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin5(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 5 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 6"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin6(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 6 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 7"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
- self.w
+ pub fn pin7(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 7 }
}
- }
- #[doc = "Reader of field `pin15`"]
- pub type PIN15_R = crate::R;
- #[doc = "Write proxy for field `pin15`"]
- pub struct PIN15_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN15_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 8"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin8(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 8 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 9"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin9(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 9 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 10"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
- self.w
+ pub fn pin10(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 10,
+ }
}
- }
- #[doc = "Reader of field `pin16`"]
- pub type PIN16_R = crate::R;
- #[doc = "Write proxy for field `pin16`"]
- pub struct PIN16_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN16_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 11"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin11(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 11,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 12"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin12(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 12,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 13"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
- self.w
+ pub fn pin13(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 13,
+ }
}
- }
- #[doc = "Reader of field `pin17`"]
- pub type PIN17_R = crate::R;
- #[doc = "Write proxy for field `pin17`"]
- pub struct PIN17_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN17_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 14"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin14(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 14,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 15"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin15(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 15,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 16"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17);
- self.w
+ pub fn pin16(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 16,
+ }
}
- }
- #[doc = "Reader of field `pin18`"]
- pub type PIN18_R = crate::R;
- #[doc = "Write proxy for field `pin18`"]
- pub struct PIN18_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN18_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 17"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin17(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 17,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 18"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin18(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 18,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 19"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18);
- self.w
+ pub fn pin19(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 19,
+ }
}
- }
- #[doc = "Reader of field `pin19`"]
- pub type PIN19_R = crate::R;
- #[doc = "Write proxy for field `pin19`"]
- pub struct PIN19_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN19_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 20"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin20(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 20,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 21"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin21(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 21,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 22"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19);
- self.w
+ pub fn pin22(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 22,
+ }
}
- }
- #[doc = "Reader of field `pin20`"]
- pub type PIN20_R = crate::R;
- #[doc = "Write proxy for field `pin20`"]
- pub struct PIN20_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN20_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 23"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin23(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 23,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 24"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin24(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 24,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 25"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20);
- self.w
+ pub fn pin25(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 25,
+ }
}
- }
- #[doc = "Reader of field `pin21`"]
- pub type PIN21_R = crate::R;
- #[doc = "Write proxy for field `pin21`"]
- pub struct PIN21_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN21_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 26"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin26(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 26,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 27"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin27(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 27,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 28"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21);
- self.w
+ pub fn pin28(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 28,
+ }
}
- }
- #[doc = "Reader of field `pin22`"]
- pub type PIN22_R = crate::R;
- #[doc = "Write proxy for field `pin22`"]
- pub struct PIN22_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN22_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 29"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin29(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 29,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 30"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin30(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 30,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 31"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22);
- self.w
+ pub fn pin31(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 31,
+ }
+ }
+ }
+ }
+ #[doc = "Rise Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rise_ie](rise_ie) module"]
+ pub type RISE_IE = crate::Reg;
+ #[allow(missing_docs)]
+ #[doc(hidden)]
+ pub struct _RISE_IE;
+ #[doc = "`read()` method returns [rise_ie::R](rise_ie::R) reader structure"]
+ impl crate::Readable for RISE_IE {}
+ #[doc = "`write(|w| ..)` method takes [rise_ie::W](rise_ie::W) writer structure"]
+ impl crate::Writable for RISE_IE {}
+ #[doc = "Rise Interrupt Enable Register"]
+ pub mod rise_ie {
+ #[doc = "Reader of register rise_ie"]
+ pub type R = crate::R;
+ #[doc = "Writer for register rise_ie"]
+ pub type W = crate::W;
+ #[doc = "Register rise_ie `reset()`'s with value 0"]
+ impl crate::ResetValue for super::RISE_IE {
+ type Type = u32;
+ #[inline(always)]
+ fn reset_value() -> Self::Type {
+ 0
}
}
- #[doc = "Reader of field `pin23`"]
- pub type PIN23_R = crate::R;
- #[doc = "Write proxy for field `pin23`"]
- pub struct PIN23_W<'a> {
+ #[doc = "Reader of field `pin%s`"]
+ pub type PIN_R = crate::R;
+ #[doc = "Write proxy for fields `pin(0-31)`"]
+ pub struct PIN_W<'a> {
w: &'a mut W,
+ offset: usize,
}
- impl<'a> PIN23_W<'a> {
+ impl<'a> PIN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
@@ -4615,185 +4491,443 @@ pub mod gpiohs {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23);
+ self.w.bits = (self.w.bits & !(0x01 << self.offset))
+ | (((value as u32) & 0x01) << self.offset);
self.w
}
}
- #[doc = "Reader of field `pin24`"]
- pub type PIN24_R = crate::R;
- #[doc = "Write proxy for field `pin24`"]
- pub struct PIN24_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN24_W<'a> {
- #[doc = r"Sets the field bit"]
+ impl R {
+ #[doc = ""]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub unsafe fn pin(&self, n: usize) -> PIN_R {
+ PIN_R::new(((self.bits >> n) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin0(&self) -> PIN_R {
+ PIN_R::new((self.bits & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24);
- self.w
+ pub fn pin1(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 1) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin25`"]
- pub type PIN25_R = crate::R;
- #[doc = "Write proxy for field `pin25`"]
- pub struct PIN25_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN25_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 2"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin2(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 2) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 3"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin3(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 3) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 4"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25);
- self.w
+ pub fn pin4(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 4) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin26`"]
- pub type PIN26_R = crate::R;
- #[doc = "Write proxy for field `pin26`"]
- pub struct PIN26_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN26_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 5"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin5(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 5) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 6"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin6(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 6) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 7"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26);
- self.w
+ pub fn pin7(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 7) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin27`"]
- pub type PIN27_R = crate::R;
- #[doc = "Write proxy for field `pin27`"]
- pub struct PIN27_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN27_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 8"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin8(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 8) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 9"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin9(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 9) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 10"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27);
- self.w
+ pub fn pin10(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 10) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin28`"]
- pub type PIN28_R = crate::R;
- #[doc = "Write proxy for field `pin28`"]
- pub struct PIN28_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN28_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 11"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin11(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 11) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 12"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin12(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 12) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 13"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28);
- self.w
+ pub fn pin13(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 13) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin29`"]
- pub type PIN29_R = crate::R;
- #[doc = "Write proxy for field `pin29`"]
- pub struct PIN29_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN29_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 14"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin14(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 14) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 15"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin15(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 15) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 16"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29);
- self.w
+ pub fn pin16(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 16) & 0x01) != 0)
+ }
+ #[doc = "Bit 17"]
+ #[inline(always)]
+ pub fn pin17(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 17) & 0x01) != 0)
+ }
+ #[doc = "Bit 18"]
+ #[inline(always)]
+ pub fn pin18(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 18) & 0x01) != 0)
+ }
+ #[doc = "Bit 19"]
+ #[inline(always)]
+ pub fn pin19(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 19) & 0x01) != 0)
+ }
+ #[doc = "Bit 20"]
+ #[inline(always)]
+ pub fn pin20(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 20) & 0x01) != 0)
+ }
+ #[doc = "Bit 21"]
+ #[inline(always)]
+ pub fn pin21(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 21) & 0x01) != 0)
+ }
+ #[doc = "Bit 22"]
+ #[inline(always)]
+ pub fn pin22(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 22) & 0x01) != 0)
+ }
+ #[doc = "Bit 23"]
+ #[inline(always)]
+ pub fn pin23(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 23) & 0x01) != 0)
+ }
+ #[doc = "Bit 24"]
+ #[inline(always)]
+ pub fn pin24(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 24) & 0x01) != 0)
+ }
+ #[doc = "Bit 25"]
+ #[inline(always)]
+ pub fn pin25(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 25) & 0x01) != 0)
+ }
+ #[doc = "Bit 26"]
+ #[inline(always)]
+ pub fn pin26(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 26) & 0x01) != 0)
+ }
+ #[doc = "Bit 27"]
+ #[inline(always)]
+ pub fn pin27(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 27) & 0x01) != 0)
+ }
+ #[doc = "Bit 28"]
+ #[inline(always)]
+ pub fn pin28(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 28) & 0x01) != 0)
+ }
+ #[doc = "Bit 29"]
+ #[inline(always)]
+ pub fn pin29(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 29) & 0x01) != 0)
+ }
+ #[doc = "Bit 30"]
+ #[inline(always)]
+ pub fn pin30(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 30) & 0x01) != 0)
+ }
+ #[doc = "Bit 31"]
+ #[inline(always)]
+ pub fn pin31(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 31) & 0x01) != 0)
}
}
- #[doc = "Reader of field `pin30`"]
- pub type PIN30_R = crate::R;
- #[doc = "Write proxy for field `pin30`"]
- pub struct PIN30_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN30_W<'a> {
- #[doc = r"Sets the field bit"]
+ impl W {
+ #[doc = ""]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub unsafe fn pin(&mut self, n: usize) -> PIN_W {
+ PIN_W { w: self, offset: n }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin0(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 0 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30);
- self.w
+ pub fn pin1(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 1 }
+ }
+ #[doc = "Bit 2"]
+ #[inline(always)]
+ pub fn pin2(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 2 }
+ }
+ #[doc = "Bit 3"]
+ #[inline(always)]
+ pub fn pin3(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 3 }
+ }
+ #[doc = "Bit 4"]
+ #[inline(always)]
+ pub fn pin4(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 4 }
+ }
+ #[doc = "Bit 5"]
+ #[inline(always)]
+ pub fn pin5(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 5 }
+ }
+ #[doc = "Bit 6"]
+ #[inline(always)]
+ pub fn pin6(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 6 }
+ }
+ #[doc = "Bit 7"]
+ #[inline(always)]
+ pub fn pin7(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 7 }
+ }
+ #[doc = "Bit 8"]
+ #[inline(always)]
+ pub fn pin8(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 8 }
+ }
+ #[doc = "Bit 9"]
+ #[inline(always)]
+ pub fn pin9(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 9 }
+ }
+ #[doc = "Bit 10"]
+ #[inline(always)]
+ pub fn pin10(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 10,
+ }
+ }
+ #[doc = "Bit 11"]
+ #[inline(always)]
+ pub fn pin11(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 11,
+ }
+ }
+ #[doc = "Bit 12"]
+ #[inline(always)]
+ pub fn pin12(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 12,
+ }
+ }
+ #[doc = "Bit 13"]
+ #[inline(always)]
+ pub fn pin13(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 13,
+ }
+ }
+ #[doc = "Bit 14"]
+ #[inline(always)]
+ pub fn pin14(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 14,
+ }
+ }
+ #[doc = "Bit 15"]
+ #[inline(always)]
+ pub fn pin15(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 15,
+ }
+ }
+ #[doc = "Bit 16"]
+ #[inline(always)]
+ pub fn pin16(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 16,
+ }
+ }
+ #[doc = "Bit 17"]
+ #[inline(always)]
+ pub fn pin17(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 17,
+ }
+ }
+ #[doc = "Bit 18"]
+ #[inline(always)]
+ pub fn pin18(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 18,
+ }
+ }
+ #[doc = "Bit 19"]
+ #[inline(always)]
+ pub fn pin19(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 19,
+ }
+ }
+ #[doc = "Bit 20"]
+ #[inline(always)]
+ pub fn pin20(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 20,
+ }
+ }
+ #[doc = "Bit 21"]
+ #[inline(always)]
+ pub fn pin21(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 21,
+ }
+ }
+ #[doc = "Bit 22"]
+ #[inline(always)]
+ pub fn pin22(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 22,
+ }
+ }
+ #[doc = "Bit 23"]
+ #[inline(always)]
+ pub fn pin23(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 23,
+ }
+ }
+ #[doc = "Bit 24"]
+ #[inline(always)]
+ pub fn pin24(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 24,
+ }
+ }
+ #[doc = "Bit 25"]
+ #[inline(always)]
+ pub fn pin25(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 25,
+ }
+ }
+ #[doc = "Bit 26"]
+ #[inline(always)]
+ pub fn pin26(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 26,
+ }
+ }
+ #[doc = "Bit 27"]
+ #[inline(always)]
+ pub fn pin27(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 27,
+ }
+ }
+ #[doc = "Bit 28"]
+ #[inline(always)]
+ pub fn pin28(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 28,
+ }
+ }
+ #[doc = "Bit 29"]
+ #[inline(always)]
+ pub fn pin29(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 29,
+ }
+ }
+ #[doc = "Bit 30"]
+ #[inline(always)]
+ pub fn pin30(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 30,
+ }
+ }
+ #[doc = "Bit 31"]
+ #[inline(always)]
+ pub fn pin31(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 31,
+ }
+ }
+ }
+ }
+ #[doc = "Rise Interrupt Pending Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rise_ip](rise_ip) module"]
+ pub type RISE_IP = crate::Reg;
+ #[allow(missing_docs)]
+ #[doc(hidden)]
+ pub struct _RISE_IP;
+ #[doc = "`read()` method returns [rise_ip::R](rise_ip::R) reader structure"]
+ impl crate::Readable for RISE_IP {}
+ #[doc = "`write(|w| ..)` method takes [rise_ip::W](rise_ip::W) writer structure"]
+ impl crate::Writable for RISE_IP {}
+ #[doc = "Rise Interrupt Pending Register"]
+ pub mod rise_ip {
+ #[doc = "Reader of register rise_ip"]
+ pub type R = crate::R;
+ #[doc = "Writer for register rise_ip"]
+ pub type W = crate::W;
+ #[doc = "Register rise_ip `reset()`'s with value 0"]
+ impl crate::ResetValue for super::RISE_IP {
+ type Type = u32;
+ #[inline(always)]
+ fn reset_value() -> Self::Type {
+ 0
}
}
- #[doc = "Reader of field `pin31`"]
- pub type PIN31_R = crate::R;
- #[doc = "Write proxy for field `pin31`"]
- pub struct PIN31_W<'a> {
+ #[doc = "Reader of field `pin%s`"]
+ pub type PIN_R = crate::R;
+ #[doc = "Write proxy for fields `pin(0-31)`"]
+ pub struct PIN_W<'a> {
w: &'a mut W,
+ offset: usize,
}
- impl<'a> PIN31_W<'a> {
+ impl<'a> PIN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
@@ -4807,365 +4941,443 @@ pub mod gpiohs {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31);
+ self.w.bits = (self.w.bits & !(0x01 << self.offset))
+ | (((value as u32) & 0x01) << self.offset);
self.w
}
}
impl R {
+ #[doc = ""]
+ #[inline(always)]
+ pub unsafe fn pin(&self, n: usize) -> PIN_R {
+ PIN_R::new(((self.bits >> n) & 0x01) != 0)
+ }
#[doc = "Bit 0"]
#[inline(always)]
- pub fn pin0(&self) -> PIN0_R {
- PIN0_R::new((self.bits & 0x01) != 0)
+ pub fn pin0(&self) -> PIN_R {
+ PIN_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1"]
#[inline(always)]
- pub fn pin1(&self) -> PIN1_R {
- PIN1_R::new(((self.bits >> 1) & 0x01) != 0)
+ pub fn pin1(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2"]
#[inline(always)]
- pub fn pin2(&self) -> PIN2_R {
- PIN2_R::new(((self.bits >> 2) & 0x01) != 0)
+ pub fn pin2(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3"]
#[inline(always)]
- pub fn pin3(&self) -> PIN3_R {
- PIN3_R::new(((self.bits >> 3) & 0x01) != 0)
+ pub fn pin3(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4"]
#[inline(always)]
- pub fn pin4(&self) -> PIN4_R {
- PIN4_R::new(((self.bits >> 4) & 0x01) != 0)
+ pub fn pin4(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5"]
#[inline(always)]
- pub fn pin5(&self) -> PIN5_R {
- PIN5_R::new(((self.bits >> 5) & 0x01) != 0)
+ pub fn pin5(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6"]
#[inline(always)]
- pub fn pin6(&self) -> PIN6_R {
- PIN6_R::new(((self.bits >> 6) & 0x01) != 0)
+ pub fn pin6(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7"]
#[inline(always)]
- pub fn pin7(&self) -> PIN7_R {
- PIN7_R::new(((self.bits >> 7) & 0x01) != 0)
+ pub fn pin7(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8"]
#[inline(always)]
- pub fn pin8(&self) -> PIN8_R {
- PIN8_R::new(((self.bits >> 8) & 0x01) != 0)
+ pub fn pin8(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9"]
#[inline(always)]
- pub fn pin9(&self) -> PIN9_R {
- PIN9_R::new(((self.bits >> 9) & 0x01) != 0)
+ pub fn pin9(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10"]
#[inline(always)]
- pub fn pin10(&self) -> PIN10_R {
- PIN10_R::new(((self.bits >> 10) & 0x01) != 0)
+ pub fn pin10(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11"]
#[inline(always)]
- pub fn pin11(&self) -> PIN11_R {
- PIN11_R::new(((self.bits >> 11) & 0x01) != 0)
+ pub fn pin11(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12"]
#[inline(always)]
- pub fn pin12(&self) -> PIN12_R {
- PIN12_R::new(((self.bits >> 12) & 0x01) != 0)
+ pub fn pin12(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13"]
#[inline(always)]
- pub fn pin13(&self) -> PIN13_R {
- PIN13_R::new(((self.bits >> 13) & 0x01) != 0)
+ pub fn pin13(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 14"]
#[inline(always)]
- pub fn pin14(&self) -> PIN14_R {
- PIN14_R::new(((self.bits >> 14) & 0x01) != 0)
+ pub fn pin14(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 15"]
#[inline(always)]
- pub fn pin15(&self) -> PIN15_R {
- PIN15_R::new(((self.bits >> 15) & 0x01) != 0)
+ pub fn pin15(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 16"]
#[inline(always)]
- pub fn pin16(&self) -> PIN16_R {
- PIN16_R::new(((self.bits >> 16) & 0x01) != 0)
+ pub fn pin16(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 17"]
#[inline(always)]
- pub fn pin17(&self) -> PIN17_R {
- PIN17_R::new(((self.bits >> 17) & 0x01) != 0)
+ pub fn pin17(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 18"]
#[inline(always)]
- pub fn pin18(&self) -> PIN18_R {
- PIN18_R::new(((self.bits >> 18) & 0x01) != 0)
+ pub fn pin18(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 19"]
#[inline(always)]
- pub fn pin19(&self) -> PIN19_R {
- PIN19_R::new(((self.bits >> 19) & 0x01) != 0)
+ pub fn pin19(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 20"]
#[inline(always)]
- pub fn pin20(&self) -> PIN20_R {
- PIN20_R::new(((self.bits >> 20) & 0x01) != 0)
+ pub fn pin20(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 20) & 0x01) != 0)
}
#[doc = "Bit 21"]
#[inline(always)]
- pub fn pin21(&self) -> PIN21_R {
- PIN21_R::new(((self.bits >> 21) & 0x01) != 0)
+ pub fn pin21(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 21) & 0x01) != 0)
}
#[doc = "Bit 22"]
#[inline(always)]
- pub fn pin22(&self) -> PIN22_R {
- PIN22_R::new(((self.bits >> 22) & 0x01) != 0)
+ pub fn pin22(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 22) & 0x01) != 0)
}
#[doc = "Bit 23"]
#[inline(always)]
- pub fn pin23(&self) -> PIN23_R {
- PIN23_R::new(((self.bits >> 23) & 0x01) != 0)
+ pub fn pin23(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 23) & 0x01) != 0)
}
#[doc = "Bit 24"]
#[inline(always)]
- pub fn pin24(&self) -> PIN24_R {
- PIN24_R::new(((self.bits >> 24) & 0x01) != 0)
+ pub fn pin24(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 24) & 0x01) != 0)
}
#[doc = "Bit 25"]
#[inline(always)]
- pub fn pin25(&self) -> PIN25_R {
- PIN25_R::new(((self.bits >> 25) & 0x01) != 0)
+ pub fn pin25(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 25) & 0x01) != 0)
}
#[doc = "Bit 26"]
#[inline(always)]
- pub fn pin26(&self) -> PIN26_R {
- PIN26_R::new(((self.bits >> 26) & 0x01) != 0)
+ pub fn pin26(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 26) & 0x01) != 0)
}
#[doc = "Bit 27"]
#[inline(always)]
- pub fn pin27(&self) -> PIN27_R {
- PIN27_R::new(((self.bits >> 27) & 0x01) != 0)
+ pub fn pin27(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 27) & 0x01) != 0)
}
#[doc = "Bit 28"]
#[inline(always)]
- pub fn pin28(&self) -> PIN28_R {
- PIN28_R::new(((self.bits >> 28) & 0x01) != 0)
+ pub fn pin28(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 28) & 0x01) != 0)
}
#[doc = "Bit 29"]
#[inline(always)]
- pub fn pin29(&self) -> PIN29_R {
- PIN29_R::new(((self.bits >> 29) & 0x01) != 0)
+ pub fn pin29(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 29) & 0x01) != 0)
}
#[doc = "Bit 30"]
#[inline(always)]
- pub fn pin30(&self) -> PIN30_R {
- PIN30_R::new(((self.bits >> 30) & 0x01) != 0)
+ pub fn pin30(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 30) & 0x01) != 0)
}
#[doc = "Bit 31"]
#[inline(always)]
- pub fn pin31(&self) -> PIN31_R {
- PIN31_R::new(((self.bits >> 31) & 0x01) != 0)
+ pub fn pin31(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 31) & 0x01) != 0)
}
}
impl W {
+ #[doc = ""]
+ #[inline(always)]
+ pub unsafe fn pin(&mut self, n: usize) -> PIN_W {
+ PIN_W { w: self, offset: n }
+ }
#[doc = "Bit 0"]
#[inline(always)]
- pub fn pin0(&mut self) -> PIN0_W {
- PIN0_W { w: self }
+ pub fn pin0(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 0 }
}
#[doc = "Bit 1"]
#[inline(always)]
- pub fn pin1(&mut self) -> PIN1_W {
- PIN1_W { w: self }
+ pub fn pin1(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 1 }
}
#[doc = "Bit 2"]
#[inline(always)]
- pub fn pin2(&mut self) -> PIN2_W {
- PIN2_W { w: self }
+ pub fn pin2(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 2 }
}
#[doc = "Bit 3"]
#[inline(always)]
- pub fn pin3(&mut self) -> PIN3_W {
- PIN3_W { w: self }
+ pub fn pin3(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 3 }
}
#[doc = "Bit 4"]
#[inline(always)]
- pub fn pin4(&mut self) -> PIN4_W {
- PIN4_W { w: self }
+ pub fn pin4(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 4 }
}
#[doc = "Bit 5"]
#[inline(always)]
- pub fn pin5(&mut self) -> PIN5_W {
- PIN5_W { w: self }
+ pub fn pin5(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 5 }
}
#[doc = "Bit 6"]
#[inline(always)]
- pub fn pin6(&mut self) -> PIN6_W {
- PIN6_W { w: self }
+ pub fn pin6(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 6 }
}
#[doc = "Bit 7"]
#[inline(always)]
- pub fn pin7(&mut self) -> PIN7_W {
- PIN7_W { w: self }
+ pub fn pin7(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 7 }
}
#[doc = "Bit 8"]
#[inline(always)]
- pub fn pin8(&mut self) -> PIN8_W {
- PIN8_W { w: self }
+ pub fn pin8(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 8 }
}
#[doc = "Bit 9"]
#[inline(always)]
- pub fn pin9(&mut self) -> PIN9_W {
- PIN9_W { w: self }
+ pub fn pin9(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 9 }
}
#[doc = "Bit 10"]
#[inline(always)]
- pub fn pin10(&mut self) -> PIN10_W {
- PIN10_W { w: self }
+ pub fn pin10(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 10,
+ }
}
#[doc = "Bit 11"]
#[inline(always)]
- pub fn pin11(&mut self) -> PIN11_W {
- PIN11_W { w: self }
+ pub fn pin11(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 11,
+ }
}
#[doc = "Bit 12"]
#[inline(always)]
- pub fn pin12(&mut self) -> PIN12_W {
- PIN12_W { w: self }
+ pub fn pin12(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 12,
+ }
}
#[doc = "Bit 13"]
#[inline(always)]
- pub fn pin13(&mut self) -> PIN13_W {
- PIN13_W { w: self }
+ pub fn pin13(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 13,
+ }
}
#[doc = "Bit 14"]
#[inline(always)]
- pub fn pin14(&mut self) -> PIN14_W {
- PIN14_W { w: self }
+ pub fn pin14(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 14,
+ }
}
#[doc = "Bit 15"]
#[inline(always)]
- pub fn pin15(&mut self) -> PIN15_W {
- PIN15_W { w: self }
+ pub fn pin15(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 15,
+ }
}
#[doc = "Bit 16"]
#[inline(always)]
- pub fn pin16(&mut self) -> PIN16_W {
- PIN16_W { w: self }
+ pub fn pin16(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 16,
+ }
}
#[doc = "Bit 17"]
#[inline(always)]
- pub fn pin17(&mut self) -> PIN17_W {
- PIN17_W { w: self }
+ pub fn pin17(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 17,
+ }
}
#[doc = "Bit 18"]
#[inline(always)]
- pub fn pin18(&mut self) -> PIN18_W {
- PIN18_W { w: self }
+ pub fn pin18(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 18,
+ }
}
#[doc = "Bit 19"]
#[inline(always)]
- pub fn pin19(&mut self) -> PIN19_W {
- PIN19_W { w: self }
+ pub fn pin19(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 19,
+ }
}
#[doc = "Bit 20"]
#[inline(always)]
- pub fn pin20(&mut self) -> PIN20_W {
- PIN20_W { w: self }
+ pub fn pin20(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 20,
+ }
}
#[doc = "Bit 21"]
#[inline(always)]
- pub fn pin21(&mut self) -> PIN21_W {
- PIN21_W { w: self }
+ pub fn pin21(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 21,
+ }
}
#[doc = "Bit 22"]
#[inline(always)]
- pub fn pin22(&mut self) -> PIN22_W {
- PIN22_W { w: self }
+ pub fn pin22(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 22,
+ }
}
#[doc = "Bit 23"]
#[inline(always)]
- pub fn pin23(&mut self) -> PIN23_W {
- PIN23_W { w: self }
+ pub fn pin23(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 23,
+ }
}
#[doc = "Bit 24"]
#[inline(always)]
- pub fn pin24(&mut self) -> PIN24_W {
- PIN24_W { w: self }
+ pub fn pin24(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 24,
+ }
}
#[doc = "Bit 25"]
#[inline(always)]
- pub fn pin25(&mut self) -> PIN25_W {
- PIN25_W { w: self }
+ pub fn pin25(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 25,
+ }
}
#[doc = "Bit 26"]
#[inline(always)]
- pub fn pin26(&mut self) -> PIN26_W {
- PIN26_W { w: self }
+ pub fn pin26(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 26,
+ }
}
#[doc = "Bit 27"]
#[inline(always)]
- pub fn pin27(&mut self) -> PIN27_W {
- PIN27_W { w: self }
+ pub fn pin27(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 27,
+ }
}
#[doc = "Bit 28"]
#[inline(always)]
- pub fn pin28(&mut self) -> PIN28_W {
- PIN28_W { w: self }
+ pub fn pin28(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 28,
+ }
}
#[doc = "Bit 29"]
#[inline(always)]
- pub fn pin29(&mut self) -> PIN29_W {
- PIN29_W { w: self }
+ pub fn pin29(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 29,
+ }
}
#[doc = "Bit 30"]
#[inline(always)]
- pub fn pin30(&mut self) -> PIN30_W {
- PIN30_W { w: self }
+ pub fn pin30(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 30,
+ }
}
#[doc = "Bit 31"]
#[inline(always)]
- pub fn pin31(&mut self) -> PIN31_W {
- PIN31_W { w: self }
+ pub fn pin31(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 31,
+ }
}
}
}
- #[doc = "Output Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [output_val](output_val) module"]
- pub type OUTPUT_VAL = crate::Reg;
+ #[doc = "Fall Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fall_ie](fall_ie) module"]
+ pub type FALL_IE = crate::Reg;
#[allow(missing_docs)]
#[doc(hidden)]
- pub struct _OUTPUT_VAL;
- #[doc = "`read()` method returns [output_val::R](output_val::R) reader structure"]
- impl crate::Readable for OUTPUT_VAL {}
- #[doc = "`write(|w| ..)` method takes [output_val::W](output_val::W) writer structure"]
- impl crate::Writable for OUTPUT_VAL {}
- #[doc = "Output Value Register"]
- pub mod output_val {
- #[doc = "Reader of register output_val"]
- pub type R = crate::R;
- #[doc = "Writer for register output_val"]
- pub type W = crate::W;
- #[doc = "Register output_val `reset()`'s with value 0"]
- impl crate::ResetValue for super::OUTPUT_VAL {
+ pub struct _FALL_IE;
+ #[doc = "`read()` method returns [fall_ie::R](fall_ie::R) reader structure"]
+ impl crate::Readable for FALL_IE {}
+ #[doc = "`write(|w| ..)` method takes [fall_ie::W](fall_ie::W) writer structure"]
+ impl crate::Writable for FALL_IE {}
+ #[doc = "Fall Interrupt Enable Register"]
+ pub mod fall_ie {
+ #[doc = "Reader of register fall_ie"]
+ pub type R = crate::R;
+ #[doc = "Writer for register fall_ie"]
+ pub type W = crate::W;
+ #[doc = "Register fall_ie `reset()`'s with value 0"]
+ impl crate::ResetValue for super::FALL_IE {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
- #[doc = "Reader of field `pin0`"]
- pub type PIN0_R = crate::R;
- #[doc = "Write proxy for field `pin0`"]
- pub struct PIN0_W<'a> {
+ #[doc = "Reader of field `pin%s`"]
+ pub type PIN_R = crate::R;
+ #[doc = "Write proxy for fields `pin(0-31)`"]
+ pub struct PIN_W<'a> {
w: &'a mut W,
+ offset: usize,
}
- impl<'a> PIN0_W<'a> {
+ impl<'a> PIN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
@@ -5179,545 +5391,443 @@ pub mod gpiohs {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
+ self.w.bits = (self.w.bits & !(0x01 << self.offset))
+ | (((value as u32) & 0x01) << self.offset);
self.w
}
}
- #[doc = "Reader of field `pin1`"]
- pub type PIN1_R = crate::R;
- #[doc = "Write proxy for field `pin1`"]
- pub struct PIN1_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN1_W<'a> {
- #[doc = r"Sets the field bit"]
+ impl R {
+ #[doc = ""]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub unsafe fn pin(&self, n: usize) -> PIN_R {
+ PIN_R::new(((self.bits >> n) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin0(&self) -> PIN_R {
+ PIN_R::new((self.bits & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
- self.w
+ pub fn pin1(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 1) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin2`"]
- pub type PIN2_R = crate::R;
- #[doc = "Write proxy for field `pin2`"]
- pub struct PIN2_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN2_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 2"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin2(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 2) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 3"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin3(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 3) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 4"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
- self.w
+ pub fn pin4(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 4) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin3`"]
- pub type PIN3_R = crate::R;
- #[doc = "Write proxy for field `pin3`"]
- pub struct PIN3_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN3_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 5"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin5(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 5) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 6"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin6(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 6) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 7"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
- self.w
+ pub fn pin7(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 7) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin4`"]
- pub type PIN4_R = crate::R;
- #[doc = "Write proxy for field `pin4`"]
- pub struct PIN4_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN4_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 8"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin8(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 8) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 9"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin9(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 9) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 10"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
- self.w
+ pub fn pin10(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 10) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin5`"]
- pub type PIN5_R = crate::R;
- #[doc = "Write proxy for field `pin5`"]
- pub struct PIN5_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN5_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 11"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin11(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 11) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 12"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin12(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 12) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 13"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
- self.w
+ pub fn pin13(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 13) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin6`"]
- pub type PIN6_R = crate::R;
- #[doc = "Write proxy for field `pin6`"]
- pub struct PIN6_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN6_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 14"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin14(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 14) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 15"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin15(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 15) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 16"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
- self.w
+ pub fn pin16(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 16) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin7`"]
- pub type PIN7_R = crate::R;
- #[doc = "Write proxy for field `pin7`"]
- pub struct PIN7_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN7_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 17"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin17(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 17) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 18"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin18(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 18) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 19"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
- self.w
+ pub fn pin19(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 19) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin8`"]
- pub type PIN8_R = crate::R;
- #[doc = "Write proxy for field `pin8`"]
- pub struct PIN8_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN8_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 20"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin20(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 20) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 21"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin21(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 21) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 22"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
- self.w
+ pub fn pin22(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 22) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin9`"]
- pub type PIN9_R = crate::R;
- #[doc = "Write proxy for field `pin9`"]
- pub struct PIN9_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN9_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 23"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin23(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 23) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 24"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin24(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 24) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 25"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
- self.w
+ pub fn pin25(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 25) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin10`"]
- pub type PIN10_R = crate::R;
- #[doc = "Write proxy for field `pin10`"]
- pub struct PIN10_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN10_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 26"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin26(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 26) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 27"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin27(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 27) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 28"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
- self.w
+ pub fn pin28(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 28) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin11`"]
- pub type PIN11_R = crate::R;
- #[doc = "Write proxy for field `pin11`"]
- pub struct PIN11_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN11_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 29"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin29(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 29) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 30"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin30(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 30) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 31"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
- self.w
+ pub fn pin31(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 31) & 0x01) != 0)
}
}
- #[doc = "Reader of field `pin12`"]
- pub type PIN12_R = crate::R;
- #[doc = "Write proxy for field `pin12`"]
- pub struct PIN12_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN12_W<'a> {
- #[doc = r"Sets the field bit"]
+ impl W {
+ #[doc = ""]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub unsafe fn pin(&mut self, n: usize) -> PIN_W {
+ PIN_W { w: self, offset: n }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin0(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 0 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
- self.w
+ pub fn pin1(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 1 }
}
- }
- #[doc = "Reader of field `pin13`"]
- pub type PIN13_R = crate::R;
- #[doc = "Write proxy for field `pin13`"]
- pub struct PIN13_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN13_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 2"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin2(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 2 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 3"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin3(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 3 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 4"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13);
- self.w
+ pub fn pin4(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 4 }
}
- }
- #[doc = "Reader of field `pin14`"]
- pub type PIN14_R = crate::R;
- #[doc = "Write proxy for field `pin14`"]
- pub struct PIN14_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN14_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 5"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin5(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 5 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 6"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin6(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 6 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 7"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
- self.w
+ pub fn pin7(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 7 }
}
- }
- #[doc = "Reader of field `pin15`"]
- pub type PIN15_R = crate::R;
- #[doc = "Write proxy for field `pin15`"]
- pub struct PIN15_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN15_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 8"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin8(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 8 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 9"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin9(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 9 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 10"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
- self.w
+ pub fn pin10(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 10,
+ }
}
- }
- #[doc = "Reader of field `pin16`"]
- pub type PIN16_R = crate::R;
- #[doc = "Write proxy for field `pin16`"]
- pub struct PIN16_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN16_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 11"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin11(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 11,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 12"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin12(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 12,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 13"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
- self.w
+ pub fn pin13(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 13,
+ }
}
- }
- #[doc = "Reader of field `pin17`"]
- pub type PIN17_R = crate::R;
- #[doc = "Write proxy for field `pin17`"]
- pub struct PIN17_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN17_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 14"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin14(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 14,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 15"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin15(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 15,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 16"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17);
- self.w
+ pub fn pin16(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 16,
+ }
}
- }
- #[doc = "Reader of field `pin18`"]
- pub type PIN18_R = crate::R;
- #[doc = "Write proxy for field `pin18`"]
- pub struct PIN18_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN18_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 17"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin17(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 17,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 18"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin18(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 18,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 19"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18);
- self.w
+ pub fn pin19(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 19,
+ }
}
- }
- #[doc = "Reader of field `pin19`"]
- pub type PIN19_R = crate::R;
- #[doc = "Write proxy for field `pin19`"]
- pub struct PIN19_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN19_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 20"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin20(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 20,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 21"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin21(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 21,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 22"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19);
- self.w
+ pub fn pin22(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 22,
+ }
}
- }
- #[doc = "Reader of field `pin20`"]
- pub type PIN20_R = crate::R;
- #[doc = "Write proxy for field `pin20`"]
- pub struct PIN20_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN20_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 23"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin23(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 23,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 24"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin24(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 24,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 25"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20);
- self.w
+ pub fn pin25(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 25,
+ }
}
- }
- #[doc = "Reader of field `pin21`"]
- pub type PIN21_R = crate::R;
- #[doc = "Write proxy for field `pin21`"]
- pub struct PIN21_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN21_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 26"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin26(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 26,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 27"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin27(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 27,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 28"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21);
- self.w
+ pub fn pin28(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 28,
+ }
}
- }
- #[doc = "Reader of field `pin22`"]
- pub type PIN22_R = crate::R;
- #[doc = "Write proxy for field `pin22`"]
- pub struct PIN22_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN22_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 29"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin29(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 29,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 30"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin30(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 30,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 31"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22);
- self.w
+ pub fn pin31(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 31,
+ }
+ }
+ }
+ }
+ #[doc = "Fall Interrupt Pending Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fall_ip](fall_ip) module"]
+ pub type FALL_IP = crate::Reg;
+ #[allow(missing_docs)]
+ #[doc(hidden)]
+ pub struct _FALL_IP;
+ #[doc = "`read()` method returns [fall_ip::R](fall_ip::R) reader structure"]
+ impl crate::Readable for FALL_IP {}
+ #[doc = "`write(|w| ..)` method takes [fall_ip::W](fall_ip::W) writer structure"]
+ impl crate::Writable for FALL_IP {}
+ #[doc = "Fall Interrupt Pending Register"]
+ pub mod fall_ip {
+ #[doc = "Reader of register fall_ip"]
+ pub type R = crate::R;
+ #[doc = "Writer for register fall_ip"]
+ pub type W = crate::W;
+ #[doc = "Register fall_ip `reset()`'s with value 0"]
+ impl crate::ResetValue for super::FALL_IP {
+ type Type = u32;
+ #[inline(always)]
+ fn reset_value() -> Self::Type {
+ 0
}
}
- #[doc = "Reader of field `pin23`"]
- pub type PIN23_R = crate::R;
- #[doc = "Write proxy for field `pin23`"]
- pub struct PIN23_W<'a> {
+ #[doc = "Reader of field `pin%s`"]
+ pub type PIN_R = crate::R;
+ #[doc = "Write proxy for fields `pin(0-31)`"]
+ pub struct PIN_W<'a> {
w: &'a mut W,
+ offset: usize,
}
- impl<'a> PIN23_W<'a> {
+ impl<'a> PIN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
@@ -5731,821 +5841,893 @@ pub mod gpiohs {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23);
+ self.w.bits = (self.w.bits & !(0x01 << self.offset))
+ | (((value as u32) & 0x01) << self.offset);
self.w
}
}
- #[doc = "Reader of field `pin24`"]
- pub type PIN24_R = crate::R;
- #[doc = "Write proxy for field `pin24`"]
- pub struct PIN24_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN24_W<'a> {
- #[doc = r"Sets the field bit"]
+ impl R {
+ #[doc = ""]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub unsafe fn pin(&self, n: usize) -> PIN_R {
+ PIN_R::new(((self.bits >> n) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin0(&self) -> PIN_R {
+ PIN_R::new((self.bits & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24);
- self.w
+ pub fn pin1(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 1) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin25`"]
- pub type PIN25_R = crate::R;
- #[doc = "Write proxy for field `pin25`"]
- pub struct PIN25_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN25_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 2"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin2(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 2) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 3"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin3(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 3) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 4"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25);
- self.w
+ pub fn pin4(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 4) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin26`"]
- pub type PIN26_R = crate::R;
- #[doc = "Write proxy for field `pin26`"]
- pub struct PIN26_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN26_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 5"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin5(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 5) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 6"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin6(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 6) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 7"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26);
- self.w
+ pub fn pin7(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 7) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin27`"]
- pub type PIN27_R = crate::R;
- #[doc = "Write proxy for field `pin27`"]
- pub struct PIN27_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN27_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 8"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin8(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 8) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 9"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin9(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 9) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 10"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27);
- self.w
+ pub fn pin10(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 10) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin28`"]
- pub type PIN28_R = crate::R;
- #[doc = "Write proxy for field `pin28`"]
- pub struct PIN28_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN28_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 11"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin11(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 11) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 12"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin12(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 12) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 13"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28);
- self.w
+ pub fn pin13(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 13) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin29`"]
- pub type PIN29_R = crate::R;
- #[doc = "Write proxy for field `pin29`"]
- pub struct PIN29_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN29_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 14"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin14(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 14) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 15"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin15(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 15) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 16"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29);
- self.w
+ pub fn pin16(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 16) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin30`"]
- pub type PIN30_R = crate::R;
- #[doc = "Write proxy for field `pin30`"]
- pub struct PIN30_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN30_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 17"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin17(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 17) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 18"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin18(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 18) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 19"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30);
- self.w
+ pub fn pin19(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 19) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin31`"]
- pub type PIN31_R = crate::R;
- #[doc = "Write proxy for field `pin31`"]
- pub struct PIN31_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN31_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 20"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin20(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 20) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 21"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin21(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 21) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 22"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31);
- self.w
+ pub fn pin22(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 22) & 0x01) != 0)
+ }
+ #[doc = "Bit 23"]
+ #[inline(always)]
+ pub fn pin23(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 23) & 0x01) != 0)
+ }
+ #[doc = "Bit 24"]
+ #[inline(always)]
+ pub fn pin24(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 24) & 0x01) != 0)
+ }
+ #[doc = "Bit 25"]
+ #[inline(always)]
+ pub fn pin25(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 25) & 0x01) != 0)
+ }
+ #[doc = "Bit 26"]
+ #[inline(always)]
+ pub fn pin26(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 26) & 0x01) != 0)
+ }
+ #[doc = "Bit 27"]
+ #[inline(always)]
+ pub fn pin27(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 27) & 0x01) != 0)
+ }
+ #[doc = "Bit 28"]
+ #[inline(always)]
+ pub fn pin28(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 28) & 0x01) != 0)
+ }
+ #[doc = "Bit 29"]
+ #[inline(always)]
+ pub fn pin29(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 29) & 0x01) != 0)
+ }
+ #[doc = "Bit 30"]
+ #[inline(always)]
+ pub fn pin30(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 30) & 0x01) != 0)
+ }
+ #[doc = "Bit 31"]
+ #[inline(always)]
+ pub fn pin31(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 31) & 0x01) != 0)
}
}
- impl R {
+ impl W {
+ #[doc = ""]
+ #[inline(always)]
+ pub unsafe fn pin(&mut self, n: usize) -> PIN_W {
+ PIN_W { w: self, offset: n }
+ }
#[doc = "Bit 0"]
#[inline(always)]
- pub fn pin0(&self) -> PIN0_R {
- PIN0_R::new((self.bits & 0x01) != 0)
+ pub fn pin0(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 0 }
}
#[doc = "Bit 1"]
#[inline(always)]
- pub fn pin1(&self) -> PIN1_R {
- PIN1_R::new(((self.bits >> 1) & 0x01) != 0)
+ pub fn pin1(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 1 }
}
#[doc = "Bit 2"]
#[inline(always)]
- pub fn pin2(&self) -> PIN2_R {
- PIN2_R::new(((self.bits >> 2) & 0x01) != 0)
+ pub fn pin2(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 2 }
}
#[doc = "Bit 3"]
#[inline(always)]
- pub fn pin3(&self) -> PIN3_R {
- PIN3_R::new(((self.bits >> 3) & 0x01) != 0)
+ pub fn pin3(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 3 }
}
#[doc = "Bit 4"]
#[inline(always)]
- pub fn pin4(&self) -> PIN4_R {
- PIN4_R::new(((self.bits >> 4) & 0x01) != 0)
+ pub fn pin4(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 4 }
}
#[doc = "Bit 5"]
#[inline(always)]
- pub fn pin5(&self) -> PIN5_R {
- PIN5_R::new(((self.bits >> 5) & 0x01) != 0)
+ pub fn pin5(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 5 }
}
#[doc = "Bit 6"]
#[inline(always)]
- pub fn pin6(&self) -> PIN6_R {
- PIN6_R::new(((self.bits >> 6) & 0x01) != 0)
+ pub fn pin6(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 6 }
}
#[doc = "Bit 7"]
#[inline(always)]
- pub fn pin7(&self) -> PIN7_R {
- PIN7_R::new(((self.bits >> 7) & 0x01) != 0)
+ pub fn pin7(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 7 }
}
#[doc = "Bit 8"]
#[inline(always)]
- pub fn pin8(&self) -> PIN8_R {
- PIN8_R::new(((self.bits >> 8) & 0x01) != 0)
+ pub fn pin8(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 8 }
}
#[doc = "Bit 9"]
#[inline(always)]
- pub fn pin9(&self) -> PIN9_R {
- PIN9_R::new(((self.bits >> 9) & 0x01) != 0)
+ pub fn pin9(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 9 }
}
#[doc = "Bit 10"]
#[inline(always)]
- pub fn pin10(&self) -> PIN10_R {
- PIN10_R::new(((self.bits >> 10) & 0x01) != 0)
+ pub fn pin10(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 10,
+ }
}
#[doc = "Bit 11"]
#[inline(always)]
- pub fn pin11(&self) -> PIN11_R {
- PIN11_R::new(((self.bits >> 11) & 0x01) != 0)
+ pub fn pin11(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 11,
+ }
}
#[doc = "Bit 12"]
#[inline(always)]
- pub fn pin12(&self) -> PIN12_R {
- PIN12_R::new(((self.bits >> 12) & 0x01) != 0)
+ pub fn pin12(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 12,
+ }
}
#[doc = "Bit 13"]
#[inline(always)]
- pub fn pin13(&self) -> PIN13_R {
- PIN13_R::new(((self.bits >> 13) & 0x01) != 0)
+ pub fn pin13(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 13,
+ }
}
#[doc = "Bit 14"]
#[inline(always)]
- pub fn pin14(&self) -> PIN14_R {
- PIN14_R::new(((self.bits >> 14) & 0x01) != 0)
+ pub fn pin14(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 14,
+ }
}
#[doc = "Bit 15"]
#[inline(always)]
- pub fn pin15(&self) -> PIN15_R {
- PIN15_R::new(((self.bits >> 15) & 0x01) != 0)
+ pub fn pin15(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 15,
+ }
}
#[doc = "Bit 16"]
#[inline(always)]
- pub fn pin16(&self) -> PIN16_R {
- PIN16_R::new(((self.bits >> 16) & 0x01) != 0)
+ pub fn pin16(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 16,
+ }
}
#[doc = "Bit 17"]
#[inline(always)]
- pub fn pin17(&self) -> PIN17_R {
- PIN17_R::new(((self.bits >> 17) & 0x01) != 0)
+ pub fn pin17(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 17,
+ }
}
#[doc = "Bit 18"]
#[inline(always)]
- pub fn pin18(&self) -> PIN18_R {
- PIN18_R::new(((self.bits >> 18) & 0x01) != 0)
+ pub fn pin18(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 18,
+ }
}
#[doc = "Bit 19"]
#[inline(always)]
- pub fn pin19(&self) -> PIN19_R {
- PIN19_R::new(((self.bits >> 19) & 0x01) != 0)
+ pub fn pin19(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 19,
+ }
}
#[doc = "Bit 20"]
#[inline(always)]
- pub fn pin20(&self) -> PIN20_R {
- PIN20_R::new(((self.bits >> 20) & 0x01) != 0)
+ pub fn pin20(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 20,
+ }
}
#[doc = "Bit 21"]
#[inline(always)]
- pub fn pin21(&self) -> PIN21_R {
- PIN21_R::new(((self.bits >> 21) & 0x01) != 0)
+ pub fn pin21(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 21,
+ }
}
#[doc = "Bit 22"]
#[inline(always)]
- pub fn pin22(&self) -> PIN22_R {
- PIN22_R::new(((self.bits >> 22) & 0x01) != 0)
+ pub fn pin22(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 22,
+ }
}
#[doc = "Bit 23"]
#[inline(always)]
- pub fn pin23(&self) -> PIN23_R {
- PIN23_R::new(((self.bits >> 23) & 0x01) != 0)
+ pub fn pin23(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 23,
+ }
}
#[doc = "Bit 24"]
#[inline(always)]
- pub fn pin24(&self) -> PIN24_R {
- PIN24_R::new(((self.bits >> 24) & 0x01) != 0)
+ pub fn pin24(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 24,
+ }
}
#[doc = "Bit 25"]
#[inline(always)]
- pub fn pin25(&self) -> PIN25_R {
- PIN25_R::new(((self.bits >> 25) & 0x01) != 0)
+ pub fn pin25(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 25,
+ }
}
#[doc = "Bit 26"]
#[inline(always)]
- pub fn pin26(&self) -> PIN26_R {
- PIN26_R::new(((self.bits >> 26) & 0x01) != 0)
+ pub fn pin26(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 26,
+ }
}
#[doc = "Bit 27"]
#[inline(always)]
- pub fn pin27(&self) -> PIN27_R {
- PIN27_R::new(((self.bits >> 27) & 0x01) != 0)
+ pub fn pin27(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 27,
+ }
}
#[doc = "Bit 28"]
#[inline(always)]
- pub fn pin28(&self) -> PIN28_R {
- PIN28_R::new(((self.bits >> 28) & 0x01) != 0)
+ pub fn pin28(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 28,
+ }
}
#[doc = "Bit 29"]
#[inline(always)]
- pub fn pin29(&self) -> PIN29_R {
- PIN29_R::new(((self.bits >> 29) & 0x01) != 0)
+ pub fn pin29(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 29,
+ }
}
#[doc = "Bit 30"]
#[inline(always)]
- pub fn pin30(&self) -> PIN30_R {
- PIN30_R::new(((self.bits >> 30) & 0x01) != 0)
+ pub fn pin30(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 30,
+ }
}
#[doc = "Bit 31"]
#[inline(always)]
- pub fn pin31(&self) -> PIN31_R {
- PIN31_R::new(((self.bits >> 31) & 0x01) != 0)
+ pub fn pin31(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 31,
+ }
}
}
- impl W {
+ }
+ #[doc = "High Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [high_ie](high_ie) module"]
+ pub type HIGH_IE = crate::Reg;
+ #[allow(missing_docs)]
+ #[doc(hidden)]
+ pub struct _HIGH_IE;
+ #[doc = "`read()` method returns [high_ie::R](high_ie::R) reader structure"]
+ impl crate::Readable for HIGH_IE {}
+ #[doc = "`write(|w| ..)` method takes [high_ie::W](high_ie::W) writer structure"]
+ impl crate::Writable for HIGH_IE {}
+ #[doc = "High Interrupt Enable Register"]
+ pub mod high_ie {
+ #[doc = "Reader of register high_ie"]
+ pub type R = crate::R;
+ #[doc = "Writer for register high_ie"]
+ pub type W = crate::W;
+ #[doc = "Register high_ie `reset()`'s with value 0"]
+ impl crate::ResetValue for super::HIGH_IE {
+ type Type = u32;
+ #[inline(always)]
+ fn reset_value() -> Self::Type {
+ 0
+ }
+ }
+ #[doc = "Reader of field `pin%s`"]
+ pub type PIN_R = crate::R;
+ #[doc = "Write proxy for fields `pin(0-31)`"]
+ pub struct PIN_W<'a> {
+ w: &'a mut W,
+ offset: usize,
+ }
+ impl<'a> PIN_W<'a> {
+ #[doc = r"Sets the field bit"]
+ #[inline(always)]
+ pub fn set_bit(self) -> &'a mut W {
+ self.bit(true)
+ }
+ #[doc = r"Clears the field bit"]
+ #[inline(always)]
+ pub fn clear_bit(self) -> &'a mut W {
+ self.bit(false)
+ }
+ #[doc = r"Writes raw bits to the field"]
+ #[inline(always)]
+ pub fn bit(self, value: bool) -> &'a mut W {
+ self.w.bits = (self.w.bits & !(0x01 << self.offset))
+ | (((value as u32) & 0x01) << self.offset);
+ self.w
+ }
+ }
+ impl R {
+ #[doc = ""]
+ #[inline(always)]
+ pub unsafe fn pin(&self, n: usize) -> PIN_R {
+ PIN_R::new(((self.bits >> n) & 0x01) != 0)
+ }
#[doc = "Bit 0"]
#[inline(always)]
- pub fn pin0(&mut self) -> PIN0_W {
- PIN0_W { w: self }
+ pub fn pin0(&self) -> PIN_R {
+ PIN_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1"]
#[inline(always)]
- pub fn pin1(&mut self) -> PIN1_W {
- PIN1_W { w: self }
+ pub fn pin1(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2"]
#[inline(always)]
- pub fn pin2(&mut self) -> PIN2_W {
- PIN2_W { w: self }
+ pub fn pin2(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3"]
#[inline(always)]
- pub fn pin3(&mut self) -> PIN3_W {
- PIN3_W { w: self }
+ pub fn pin3(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4"]
#[inline(always)]
- pub fn pin4(&mut self) -> PIN4_W {
- PIN4_W { w: self }
+ pub fn pin4(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5"]
#[inline(always)]
- pub fn pin5(&mut self) -> PIN5_W {
- PIN5_W { w: self }
+ pub fn pin5(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6"]
#[inline(always)]
- pub fn pin6(&mut self) -> PIN6_W {
- PIN6_W { w: self }
+ pub fn pin6(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7"]
#[inline(always)]
- pub fn pin7(&mut self) -> PIN7_W {
- PIN7_W { w: self }
+ pub fn pin7(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8"]
#[inline(always)]
- pub fn pin8(&mut self) -> PIN8_W {
- PIN8_W { w: self }
+ pub fn pin8(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9"]
#[inline(always)]
- pub fn pin9(&mut self) -> PIN9_W {
- PIN9_W { w: self }
+ pub fn pin9(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10"]
#[inline(always)]
- pub fn pin10(&mut self) -> PIN10_W {
- PIN10_W { w: self }
+ pub fn pin10(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11"]
#[inline(always)]
- pub fn pin11(&mut self) -> PIN11_W {
- PIN11_W { w: self }
+ pub fn pin11(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12"]
#[inline(always)]
- pub fn pin12(&mut self) -> PIN12_W {
- PIN12_W { w: self }
+ pub fn pin12(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13"]
#[inline(always)]
- pub fn pin13(&mut self) -> PIN13_W {
- PIN13_W { w: self }
+ pub fn pin13(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 14"]
#[inline(always)]
- pub fn pin14(&mut self) -> PIN14_W {
- PIN14_W { w: self }
+ pub fn pin14(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 15"]
#[inline(always)]
- pub fn pin15(&mut self) -> PIN15_W {
- PIN15_W { w: self }
+ pub fn pin15(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 16"]
#[inline(always)]
- pub fn pin16(&mut self) -> PIN16_W {
- PIN16_W { w: self }
+ pub fn pin16(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 17"]
#[inline(always)]
- pub fn pin17(&mut self) -> PIN17_W {
- PIN17_W { w: self }
+ pub fn pin17(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 18"]
#[inline(always)]
- pub fn pin18(&mut self) -> PIN18_W {
- PIN18_W { w: self }
+ pub fn pin18(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 19"]
#[inline(always)]
- pub fn pin19(&mut self) -> PIN19_W {
- PIN19_W { w: self }
+ pub fn pin19(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 20"]
#[inline(always)]
- pub fn pin20(&mut self) -> PIN20_W {
- PIN20_W { w: self }
+ pub fn pin20(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 20) & 0x01) != 0)
}
#[doc = "Bit 21"]
#[inline(always)]
- pub fn pin21(&mut self) -> PIN21_W {
- PIN21_W { w: self }
+ pub fn pin21(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 21) & 0x01) != 0)
}
#[doc = "Bit 22"]
#[inline(always)]
- pub fn pin22(&mut self) -> PIN22_W {
- PIN22_W { w: self }
+ pub fn pin22(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 22) & 0x01) != 0)
}
#[doc = "Bit 23"]
#[inline(always)]
- pub fn pin23(&mut self) -> PIN23_W {
- PIN23_W { w: self }
+ pub fn pin23(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 23) & 0x01) != 0)
}
#[doc = "Bit 24"]
#[inline(always)]
- pub fn pin24(&mut self) -> PIN24_W {
- PIN24_W { w: self }
+ pub fn pin24(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 24) & 0x01) != 0)
}
#[doc = "Bit 25"]
#[inline(always)]
- pub fn pin25(&mut self) -> PIN25_W {
- PIN25_W { w: self }
+ pub fn pin25(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 25) & 0x01) != 0)
}
#[doc = "Bit 26"]
#[inline(always)]
- pub fn pin26(&mut self) -> PIN26_W {
- PIN26_W { w: self }
+ pub fn pin26(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 26) & 0x01) != 0)
}
#[doc = "Bit 27"]
#[inline(always)]
- pub fn pin27(&mut self) -> PIN27_W {
- PIN27_W { w: self }
+ pub fn pin27(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 27) & 0x01) != 0)
}
#[doc = "Bit 28"]
#[inline(always)]
- pub fn pin28(&mut self) -> PIN28_W {
- PIN28_W { w: self }
+ pub fn pin28(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 28) & 0x01) != 0)
}
#[doc = "Bit 29"]
#[inline(always)]
- pub fn pin29(&mut self) -> PIN29_W {
- PIN29_W { w: self }
+ pub fn pin29(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 29) & 0x01) != 0)
}
#[doc = "Bit 30"]
#[inline(always)]
- pub fn pin30(&mut self) -> PIN30_W {
- PIN30_W { w: self }
+ pub fn pin30(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 30) & 0x01) != 0)
}
#[doc = "Bit 31"]
#[inline(always)]
- pub fn pin31(&mut self) -> PIN31_W {
- PIN31_W { w: self }
+ pub fn pin31(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 31) & 0x01) != 0)
}
}
- }
- #[doc = "Internal Pull-Up Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pullup_en](pullup_en) module"]
- pub type PULLUP_EN = crate::Reg;
- #[allow(missing_docs)]
- #[doc(hidden)]
- pub struct _PULLUP_EN;
- #[doc = "`read()` method returns [pullup_en::R](pullup_en::R) reader structure"]
- impl crate::Readable for PULLUP_EN {}
- #[doc = "`write(|w| ..)` method takes [pullup_en::W](pullup_en::W) writer structure"]
- impl crate::Writable for PULLUP_EN {}
- #[doc = "Internal Pull-Up Enable Register"]
- pub mod pullup_en {
- #[doc = "Reader of register pullup_en"]
- pub type R = crate::R;
- #[doc = "Writer for register pullup_en"]
- pub type W = crate::W;
- #[doc = "Register pullup_en `reset()`'s with value 0"]
- impl crate::ResetValue for super::PULLUP_EN {
- type Type = u32;
+ impl W {
+ #[doc = ""]
#[inline(always)]
- fn reset_value() -> Self::Type {
- 0
+ pub unsafe fn pin(&mut self, n: usize) -> PIN_W {
+ PIN_W { w: self, offset: n }
}
- }
- #[doc = "Reader of field `pin0`"]
- pub type PIN0_R = crate::R;
- #[doc = "Write proxy for field `pin0`"]
- pub struct PIN0_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN0_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin0(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 0 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin1(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 1 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 2"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
- self.w
+ pub fn pin2(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 2 }
}
- }
- #[doc = "Reader of field `pin1`"]
- pub type PIN1_R = crate::R;
- #[doc = "Write proxy for field `pin1`"]
- pub struct PIN1_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN1_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 3"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin3(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 3 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 4"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin4(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 4 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 5"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
- self.w
+ pub fn pin5(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 5 }
}
- }
- #[doc = "Reader of field `pin2`"]
- pub type PIN2_R = crate::R;
- #[doc = "Write proxy for field `pin2`"]
- pub struct PIN2_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN2_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 6"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin6(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 6 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 7"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin7(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 7 }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 8"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
- self.w
+ pub fn pin8(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 8 }
}
- }
- #[doc = "Reader of field `pin3`"]
- pub type PIN3_R = crate::R;
- #[doc = "Write proxy for field `pin3`"]
- pub struct PIN3_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN3_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 9"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin9(&mut self) -> PIN_W {
+ PIN_W { w: self, offset: 9 }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 10"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin10(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 10,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 11"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
- self.w
+ pub fn pin11(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 11,
+ }
}
- }
- #[doc = "Reader of field `pin4`"]
- pub type PIN4_R = crate::R;
- #[doc = "Write proxy for field `pin4`"]
- pub struct PIN4_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN4_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 12"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin12(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 12,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 13"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin13(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 13,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 14"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
- self.w
+ pub fn pin14(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 14,
+ }
}
- }
- #[doc = "Reader of field `pin5`"]
- pub type PIN5_R = crate::R;
- #[doc = "Write proxy for field `pin5`"]
- pub struct PIN5_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN5_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 15"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin15(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 15,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 16"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin16(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 16,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 17"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
- self.w
+ pub fn pin17(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 17,
+ }
}
- }
- #[doc = "Reader of field `pin6`"]
- pub type PIN6_R = crate::R;
- #[doc = "Write proxy for field `pin6`"]
- pub struct PIN6_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN6_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 18"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin18(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 18,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 19"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin19(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 19,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 20"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
- self.w
+ pub fn pin20(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 20,
+ }
}
- }
- #[doc = "Reader of field `pin7`"]
- pub type PIN7_R = crate::R;
- #[doc = "Write proxy for field `pin7`"]
- pub struct PIN7_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN7_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 21"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin21(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 21,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 22"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin22(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 22,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 23"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
- self.w
+ pub fn pin23(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 23,
+ }
}
- }
- #[doc = "Reader of field `pin8`"]
- pub type PIN8_R = crate::R;
- #[doc = "Write proxy for field `pin8`"]
- pub struct PIN8_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN8_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 24"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin24(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 24,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 25"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin25(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 25,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 26"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
- self.w
+ pub fn pin26(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 26,
+ }
}
- }
- #[doc = "Reader of field `pin9`"]
- pub type PIN9_R = crate::R;
- #[doc = "Write proxy for field `pin9`"]
- pub struct PIN9_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN9_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 27"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin27(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 27,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 28"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin28(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 28,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 29"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
- self.w
+ pub fn pin29(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 29,
+ }
}
- }
- #[doc = "Reader of field `pin10`"]
- pub type PIN10_R = crate::R;
- #[doc = "Write proxy for field `pin10`"]
- pub struct PIN10_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN10_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 30"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin30(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 30,
+ }
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 31"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin31(&mut self) -> PIN_W {
+ PIN_W {
+ w: self,
+ offset: 31,
+ }
}
- #[doc = r"Writes raw bits to the field"]
+ }
+ }
+ #[doc = "High Interrupt Pending Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [high_ip](high_ip) module"]
+ pub type HIGH_IP = crate::Reg;
+ #[allow(missing_docs)]
+ #[doc(hidden)]
+ pub struct _HIGH_IP;
+ #[doc = "`read()` method returns [high_ip::R](high_ip::R) reader structure"]
+ impl crate::Readable for HIGH_IP {}
+ #[doc = "`write(|w| ..)` method takes [high_ip::W](high_ip::W) writer structure"]
+ impl crate::Writable for HIGH_IP {}
+ #[doc = "High Interrupt Pending Register"]
+ pub mod high_ip {
+ #[doc = "Reader of register high_ip"]
+ pub type R = crate::R;
+ #[doc = "Writer for register high_ip"]
+ pub type W = crate::W;
+ #[doc = "Register high_ip `reset()`'s with value 0"]
+ impl crate::ResetValue for super::HIGH_IP {
+ type Type = u32;
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
- self.w
+ fn reset_value() -> Self::Type {
+ 0
}
}
- #[doc = "Reader of field `pin11`"]
- pub type PIN11_R = crate::R;
- #[doc = "Write proxy for field `pin11`"]
- pub struct PIN11_W<'a> {
+ #[doc = "Reader of field `pin%s`"]
+ pub type PIN_R = crate::R;
+ #[doc = "Write proxy for fields `pin(0-31)`"]
+ pub struct PIN_W<'a> {
w: &'a mut W,
+ offset: usize,
}
- impl<'a> PIN11_W<'a> {
+ impl<'a> PIN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
@@ -6559,473 +6741,443 @@ pub mod gpiohs {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
+ self.w.bits = (self.w.bits & !(0x01 << self.offset))
+ | (((value as u32) & 0x01) << self.offset);
self.w
}
}
- #[doc = "Reader of field `pin12`"]
- pub type PIN12_R = crate::R;
- #[doc = "Write proxy for field `pin12`"]
- pub struct PIN12_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN12_W<'a> {
- #[doc = r"Sets the field bit"]
+ impl R {
+ #[doc = ""]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub unsafe fn pin(&self, n: usize) -> PIN_R {
+ PIN_R::new(((self.bits >> n) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 0"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin0(&self) -> PIN_R {
+ PIN_R::new((self.bits & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 1"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
- self.w
+ pub fn pin1(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 1) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin13`"]
- pub type PIN13_R = crate::R;
- #[doc = "Write proxy for field `pin13`"]
- pub struct PIN13_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN13_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 2"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin2(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 2) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 3"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin3(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 3) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 4"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13);
- self.w
+ pub fn pin4(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 4) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin14`"]
- pub type PIN14_R = crate::R;
- #[doc = "Write proxy for field `pin14`"]
- pub struct PIN14_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN14_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 5"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin5(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 5) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 6"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin6(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 6) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 7"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
- self.w
+ pub fn pin7(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 7) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin15`"]
- pub type PIN15_R = crate::R;
- #[doc = "Write proxy for field `pin15`"]
- pub struct PIN15_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN15_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 8"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin8(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 8) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 9"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin9(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 9) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 10"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
- self.w
+ pub fn pin10(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 10) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin16`"]
- pub type PIN16_R = crate::R;
- #[doc = "Write proxy for field `pin16`"]
- pub struct PIN16_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN16_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 11"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin11(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 11) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 12"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin12(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 12) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 13"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
- self.w
+ pub fn pin13(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 13) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin17`"]
- pub type PIN17_R = crate::R;
- #[doc = "Write proxy for field `pin17`"]
- pub struct PIN17_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN17_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 14"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin14(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 14) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 15"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin15(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 15) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 16"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17);
- self.w
+ pub fn pin16(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 16) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin18`"]
- pub type PIN18_R = crate::R;
- #[doc = "Write proxy for field `pin18`"]
- pub struct PIN18_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN18_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 17"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin17(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 17) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 18"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin18(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 18) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 19"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18);
- self.w
+ pub fn pin19(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 19) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin19`"]
- pub type PIN19_R = crate::R;
- #[doc = "Write proxy for field `pin19`"]
- pub struct PIN19_W<'a> {
- w: &'a mut W,
- }
- impl<'a> PIN19_W<'a> {
- #[doc = r"Sets the field bit"]
+ #[doc = "Bit 20"]
#[inline(always)]
- pub fn set_bit(self) -> &'a mut W {
- self.bit(true)
+ pub fn pin20(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 20) & 0x01) != 0)
}
- #[doc = r"Clears the field bit"]
+ #[doc = "Bit 21"]
#[inline(always)]
- pub fn clear_bit(self) -> &'a mut W {
- self.bit(false)
+ pub fn pin21(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 21) & 0x01) != 0)
}
- #[doc = r"Writes raw bits to the field"]
+ #[doc = "Bit 22"]
#[inline(always)]
- pub fn bit(self, value: bool) -> &'a mut W {
- self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19);
- self.w
+ pub fn pin22(&self) -> PIN_R {
+ PIN_R::new(((self.bits >> 22) & 0x01) != 0)
}
- }
- #[doc = "Reader of field `pin20`"]
- pub type PIN20_R = crate::R