pub type R = crate::R<CCRrs>;
pub type W = crate::W<CCRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum DMAREQ_ID {
None = 0,
Dmamux1ReqGen0 = 1,
Dmamux1ReqGen1 = 2,
Dmamux1ReqGen2 = 3,
Dmamux1ReqGen3 = 4,
Dmamux1ReqGen4 = 5,
Dmamux1ReqGen5 = 6,
Dmamux1ReqGen6 = 7,
Dmamux1ReqGen7 = 8,
Adc1Dma = 9,
Adc2Dma = 10,
Tim1Ch1 = 11,
Tim1Ch2 = 12,
Tim1Ch3 = 13,
Tim1Ch4 = 14,
Tim1Up = 15,
Tim1Trig = 16,
Tim1Com = 17,
Tim2Ch1 = 18,
Tim2Ch2 = 19,
Tim2Ch3 = 20,
Tim2Ch4 = 21,
Tim2Up = 22,
Tim3Ch1 = 23,
Tim3Ch2 = 24,
Tim3Ch3 = 25,
Tim3Ch4 = 26,
Tim3Up = 27,
Tim3Trig = 28,
Tim4Ch1 = 29,
Tim4Ch2 = 30,
Tim4Ch3 = 31,
Tim4Up = 32,
I2c1RxDma = 33,
I2c1TxDma = 34,
I2c2RxDma = 35,
I2c2TxDma = 36,
Spi1RxDma = 37,
Spi1TxDma = 38,
Spi2RxDma = 39,
Spi2TxDma = 40,
Usart1RxDma = 41,
Usart1TxDma = 42,
Usart2RxDma = 43,
Usart2TxDma = 44,
Usart3RxDma = 45,
Usart3TxDma = 46,
Tim8Ch1 = 47,
Tim8Ch2 = 48,
Tim8Ch3 = 49,
Tim8Ch4 = 50,
Tim8Up = 51,
Tim8Trig = 52,
Tim8Com = 53,
Tim5Ch1 = 55,
Tim5Ch2 = 56,
Tim5Ch3 = 57,
Tim5Ch4 = 58,
Tim5Up = 59,
Tim5Trig = 60,
Spi3RxDma = 61,
Spi3TxDma = 62,
Uart4RxDma = 63,
Uart4TxDma = 64,
Uart5RxDma = 65,
Uart5TxDma = 66,
DacCh1Dma = 67,
DacCh2Dma = 68,
Tim6Up = 69,
Tim7Up = 70,
Usart6RxDma = 71,
Usart6TxDma = 72,
I2c3RxDma = 73,
I2c3TxDma = 74,
DcmiDma = 75,
CrypInDma = 76,
CrypOutDma = 77,
HashInDma = 78,
Uart7RxDma = 79,
Uart7TxDma = 80,
Uart8RxDma = 81,
Uart8TxDma = 82,
Spi4RxDma = 83,
Spi4TxDma = 84,
Spi5RxDma = 85,
Spi5TxDma = 86,
Sai1aDma = 87,
Sai1bDma = 88,
Sai2aDma = 89,
Sai2bDma = 90,
SwpmiRxDma = 91,
SwpmiTxDma = 92,
SpdifrxDatDma = 93,
SpdifrxCtrlDma = 94,
HrReq1 = 95,
HrReq2 = 96,
HrReq3 = 97,
HrReq4 = 98,
HrReq5 = 99,
HrReq6 = 100,
Dfsdm1Dma0 = 101,
Dfsdm1Dma1 = 102,
Dfsdm1Dma2 = 103,
Dfsdm1Dma3 = 104,
Tim15Ch1 = 105,
Tim15Up = 106,
Tim15Trig = 107,
Tim15Com = 108,
Tim16Ch1 = 109,
Tim16Up = 110,
Tim17Ch1 = 111,
Tim17Up = 112,
Sai3ADma = 113,
Sai3BDma = 114,
Adc3Dma = 115,
}
impl From<DMAREQ_ID> for u8 {
#[inline(always)]
fn from(variant: DMAREQ_ID) -> Self {
variant as _
}
}
impl crate::FieldSpec for DMAREQ_ID {
type Ux = u8;
}
impl crate::IsEnum for DMAREQ_ID {}
pub type DMAREQ_ID_R = crate::FieldReader<DMAREQ_ID>;
impl DMAREQ_ID_R {
#[inline(always)]
pub const fn variant(&self) -> Option<DMAREQ_ID> {
match self.bits {
0 => Some(DMAREQ_ID::None),
1 => Some(DMAREQ_ID::Dmamux1ReqGen0),
2 => Some(DMAREQ_ID::Dmamux1ReqGen1),
3 => Some(DMAREQ_ID::Dmamux1ReqGen2),
4 => Some(DMAREQ_ID::Dmamux1ReqGen3),
5 => Some(DMAREQ_ID::Dmamux1ReqGen4),
6 => Some(DMAREQ_ID::Dmamux1ReqGen5),
7 => Some(DMAREQ_ID::Dmamux1ReqGen6),
8 => Some(DMAREQ_ID::Dmamux1ReqGen7),
9 => Some(DMAREQ_ID::Adc1Dma),
10 => Some(DMAREQ_ID::Adc2Dma),
11 => Some(DMAREQ_ID::Tim1Ch1),
12 => Some(DMAREQ_ID::Tim1Ch2),
13 => Some(DMAREQ_ID::Tim1Ch3),
14 => Some(DMAREQ_ID::Tim1Ch4),
15 => Some(DMAREQ_ID::Tim1Up),
16 => Some(DMAREQ_ID::Tim1Trig),
17 => Some(DMAREQ_ID::Tim1Com),
18 => Some(DMAREQ_ID::Tim2Ch1),
19 => Some(DMAREQ_ID::Tim2Ch2),
20 => Some(DMAREQ_ID::Tim2Ch3),
21 => Some(DMAREQ_ID::Tim2Ch4),
22 => Some(DMAREQ_ID::Tim2Up),
23 => Some(DMAREQ_ID::Tim3Ch1),
24 => Some(DMAREQ_ID::Tim3Ch2),
25 => Some(DMAREQ_ID::Tim3Ch3),
26 => Some(DMAREQ_ID::Tim3Ch4),
27 => Some(DMAREQ_ID::Tim3Up),
28 => Some(DMAREQ_ID::Tim3Trig),
29 => Some(DMAREQ_ID::Tim4Ch1),
30 => Some(DMAREQ_ID::Tim4Ch2),
31 => Some(DMAREQ_ID::Tim4Ch3),
32 => Some(DMAREQ_ID::Tim4Up),
33 => Some(DMAREQ_ID::I2c1RxDma),
34 => Some(DMAREQ_ID::I2c1TxDma),
35 => Some(DMAREQ_ID::I2c2RxDma),
36 => Some(DMAREQ_ID::I2c2TxDma),
37 => Some(DMAREQ_ID::Spi1RxDma),
38 => Some(DMAREQ_ID::Spi1TxDma),
39 => Some(DMAREQ_ID::Spi2RxDma),
40 => Some(DMAREQ_ID::Spi2TxDma),
41 => Some(DMAREQ_ID::Usart1RxDma),
42 => Some(DMAREQ_ID::Usart1TxDma),
43 => Some(DMAREQ_ID::Usart2RxDma),
44 => Some(DMAREQ_ID::Usart2TxDma),
45 => Some(DMAREQ_ID::Usart3RxDma),
46 => Some(DMAREQ_ID::Usart3TxDma),
47 => Some(DMAREQ_ID::Tim8Ch1),
48 => Some(DMAREQ_ID::Tim8Ch2),
49 => Some(DMAREQ_ID::Tim8Ch3),
50 => Some(DMAREQ_ID::Tim8Ch4),
51 => Some(DMAREQ_ID::Tim8Up),
52 => Some(DMAREQ_ID::Tim8Trig),
53 => Some(DMAREQ_ID::Tim8Com),
55 => Some(DMAREQ_ID::Tim5Ch1),
56 => Some(DMAREQ_ID::Tim5Ch2),
57 => Some(DMAREQ_ID::Tim5Ch3),
58 => Some(DMAREQ_ID::Tim5Ch4),
59 => Some(DMAREQ_ID::Tim5Up),
60 => Some(DMAREQ_ID::Tim5Trig),
61 => Some(DMAREQ_ID::Spi3RxDma),
62 => Some(DMAREQ_ID::Spi3TxDma),
63 => Some(DMAREQ_ID::Uart4RxDma),
64 => Some(DMAREQ_ID::Uart4TxDma),
65 => Some(DMAREQ_ID::Uart5RxDma),
66 => Some(DMAREQ_ID::Uart5TxDma),
67 => Some(DMAREQ_ID::DacCh1Dma),
68 => Some(DMAREQ_ID::DacCh2Dma),
69 => Some(DMAREQ_ID::Tim6Up),
70 => Some(DMAREQ_ID::Tim7Up),
71 => Some(DMAREQ_ID::Usart6RxDma),
72 => Some(DMAREQ_ID::Usart6TxDma),
73 => Some(DMAREQ_ID::I2c3RxDma),
74 => Some(DMAREQ_ID::I2c3TxDma),
75 => Some(DMAREQ_ID::DcmiDma),
76 => Some(DMAREQ_ID::CrypInDma),
77 => Some(DMAREQ_ID::CrypOutDma),
78 => Some(DMAREQ_ID::HashInDma),
79 => Some(DMAREQ_ID::Uart7RxDma),
80 => Some(DMAREQ_ID::Uart7TxDma),
81 => Some(DMAREQ_ID::Uart8RxDma),
82 => Some(DMAREQ_ID::Uart8TxDma),
83 => Some(DMAREQ_ID::Spi4RxDma),
84 => Some(DMAREQ_ID::Spi4TxDma),
85 => Some(DMAREQ_ID::Spi5RxDma),
86 => Some(DMAREQ_ID::Spi5TxDma),
87 => Some(DMAREQ_ID::Sai1aDma),
88 => Some(DMAREQ_ID::Sai1bDma),
89 => Some(DMAREQ_ID::Sai2aDma),
90 => Some(DMAREQ_ID::Sai2bDma),
91 => Some(DMAREQ_ID::SwpmiRxDma),
92 => Some(DMAREQ_ID::SwpmiTxDma),
93 => Some(DMAREQ_ID::SpdifrxDatDma),
94 => Some(DMAREQ_ID::SpdifrxCtrlDma),
95 => Some(DMAREQ_ID::HrReq1),
96 => Some(DMAREQ_ID::HrReq2),
97 => Some(DMAREQ_ID::HrReq3),
98 => Some(DMAREQ_ID::HrReq4),
99 => Some(DMAREQ_ID::HrReq5),
100 => Some(DMAREQ_ID::HrReq6),
101 => Some(DMAREQ_ID::Dfsdm1Dma0),
102 => Some(DMAREQ_ID::Dfsdm1Dma1),
103 => Some(DMAREQ_ID::Dfsdm1Dma2),
104 => Some(DMAREQ_ID::Dfsdm1Dma3),
105 => Some(DMAREQ_ID::Tim15Ch1),
106 => Some(DMAREQ_ID::Tim15Up),
107 => Some(DMAREQ_ID::Tim15Trig),
108 => Some(DMAREQ_ID::Tim15Com),
109 => Some(DMAREQ_ID::Tim16Ch1),
110 => Some(DMAREQ_ID::Tim16Up),
111 => Some(DMAREQ_ID::Tim17Ch1),
112 => Some(DMAREQ_ID::Tim17Up),
113 => Some(DMAREQ_ID::Sai3ADma),
114 => Some(DMAREQ_ID::Sai3BDma),
115 => Some(DMAREQ_ID::Adc3Dma),
_ => None,
}
}
#[inline(always)]
pub fn is_none(&self) -> bool {
*self == DMAREQ_ID::None
}
#[inline(always)]
pub fn is_dmamux1_req_gen0(&self) -> bool {
*self == DMAREQ_ID::Dmamux1ReqGen0
}
#[inline(always)]
pub fn is_dmamux1_req_gen1(&self) -> bool {
*self == DMAREQ_ID::Dmamux1ReqGen1
}
#[inline(always)]
pub fn is_dmamux1_req_gen2(&self) -> bool {
*self == DMAREQ_ID::Dmamux1ReqGen2
}
#[inline(always)]
pub fn is_dmamux1_req_gen3(&self) -> bool {
*self == DMAREQ_ID::Dmamux1ReqGen3
}
#[inline(always)]
pub fn is_dmamux1_req_gen4(&self) -> bool {
*self == DMAREQ_ID::Dmamux1ReqGen4
}
#[inline(always)]
pub fn is_dmamux1_req_gen5(&self) -> bool {
*self == DMAREQ_ID::Dmamux1ReqGen5
}
#[inline(always)]
pub fn is_dmamux1_req_gen6(&self) -> bool {
*self == DMAREQ_ID::Dmamux1ReqGen6
}
#[inline(always)]
pub fn is_dmamux1_req_gen7(&self) -> bool {
*self == DMAREQ_ID::Dmamux1ReqGen7
}
#[inline(always)]
pub fn is_adc1_dma(&self) -> bool {
*self == DMAREQ_ID::Adc1Dma
}
#[inline(always)]
pub fn is_adc2_dma(&self) -> bool {
*self == DMAREQ_ID::Adc2Dma
}
#[inline(always)]
pub fn is_tim1_ch1(&self) -> bool {
*self == DMAREQ_ID::Tim1Ch1
}
#[inline(always)]
pub fn is_tim1_ch2(&self) -> bool {
*self == DMAREQ_ID::Tim1Ch2
}
#[inline(always)]
pub fn is_tim1_ch3(&self) -> bool {
*self == DMAREQ_ID::Tim1Ch3
}
#[inline(always)]
pub fn is_tim1_ch4(&self) -> bool {
*self == DMAREQ_ID::Tim1Ch4
}
#[inline(always)]
pub fn is_tim1_up(&self) -> bool {
*self == DMAREQ_ID::Tim1Up
}
#[inline(always)]
pub fn is_tim1_trig(&self) -> bool {
*self == DMAREQ_ID::Tim1Trig
}
#[inline(always)]
pub fn is_tim1_com(&self) -> bool {
*self == DMAREQ_ID::Tim1Com
}
#[inline(always)]
pub fn is_tim2_ch1(&self) -> bool {
*self == DMAREQ_ID::Tim2Ch1
}
#[inline(always)]
pub fn is_tim2_ch2(&self) -> bool {
*self == DMAREQ_ID::Tim2Ch2
}
#[inline(always)]
pub fn is_tim2_ch3(&self) -> bool {
*self == DMAREQ_ID::Tim2Ch3
}
#[inline(always)]
pub fn is_tim2_ch4(&self) -> bool {
*self == DMAREQ_ID::Tim2Ch4
}
#[inline(always)]
pub fn is_tim2_up(&self) -> bool {
*self == DMAREQ_ID::Tim2Up
}
#[inline(always)]
pub fn is_tim3_ch1(&self) -> bool {
*self == DMAREQ_ID::Tim3Ch1
}
#[inline(always)]
pub fn is_tim3_ch2(&self) -> bool {
*self == DMAREQ_ID::Tim3Ch2
}
#[inline(always)]
pub fn is_tim3_ch3(&self) -> bool {
*self == DMAREQ_ID::Tim3Ch3
}
#[inline(always)]
pub fn is_tim3_ch4(&self) -> bool {
*self == DMAREQ_ID::Tim3Ch4
}
#[inline(always)]
pub fn is_tim3_up(&self) -> bool {
*self == DMAREQ_ID::Tim3Up
}
#[inline(always)]
pub fn is_tim3_trig(&self) -> bool {
*self == DMAREQ_ID::Tim3Trig
}
#[inline(always)]
pub fn is_tim4_ch1(&self) -> bool {
*self == DMAREQ_ID::Tim4Ch1
}
#[inline(always)]
pub fn is_tim4_ch2(&self) -> bool {
*self == DMAREQ_ID::Tim4Ch2
}
#[inline(always)]
pub fn is_tim4_ch3(&self) -> bool {
*self == DMAREQ_ID::Tim4Ch3
}
#[inline(always)]
pub fn is_tim4_up(&self) -> bool {
*self == DMAREQ_ID::Tim4Up
}
#[inline(always)]
pub fn is_i2c1_rx_dma(&self) -> bool {
*self == DMAREQ_ID::I2c1RxDma
}
#[inline(always)]
pub fn is_i2c1_tx_dma(&self) -> bool {
*self == DMAREQ_ID::I2c1TxDma
}
#[inline(always)]
pub fn is_i2c2_rx_dma(&self) -> bool {
*self == DMAREQ_ID::I2c2RxDma
}
#[inline(always)]
pub fn is_i2c2_tx_dma(&self) -> bool {
*self == DMAREQ_ID::I2c2TxDma
}
#[inline(always)]
pub fn is_spi1_rx_dma(&self) -> bool {
*self == DMAREQ_ID::Spi1RxDma
}
#[inline(always)]
pub fn is_spi1_tx_dma(&self) -> bool {
*self == DMAREQ_ID::Spi1TxDma
}
#[inline(always)]
pub fn is_spi2_rx_dma(&self) -> bool {
*self == DMAREQ_ID::Spi2RxDma
}
#[inline(always)]
pub fn is_spi2_tx_dma(&self) -> bool {
*self == DMAREQ_ID::Spi2TxDma
}
#[inline(always)]
pub fn is_usart1_rx_dma(&self) -> bool {
*self == DMAREQ_ID::Usart1RxDma
}
#[inline(always)]
pub fn is_usart1_tx_dma(&self) -> bool {
*self == DMAREQ_ID::Usart1TxDma
}
#[inline(always)]
pub fn is_usart2_rx_dma(&self) -> bool {
*self == DMAREQ_ID::Usart2RxDma
}
#[inline(always)]
pub fn is_usart2_tx_dma(&self) -> bool {
*self == DMAREQ_ID::Usart2TxDma
}
#[inline(always)]
pub fn is_usart3_rx_dma(&self) -> bool {
*self == DMAREQ_ID::Usart3RxDma
}
#[inline(always)]
pub fn is_usart3_tx_dma(&self) -> bool {
*self == DMAREQ_ID::Usart3TxDma
}
#[inline(always)]
pub fn is_tim8_ch1(&self) -> bool {
*self == DMAREQ_ID::Tim8Ch1
}
#[inline(always)]
pub fn is_tim8_ch2(&self) -> bool {
*self == DMAREQ_ID::Tim8Ch2
}
#[inline(always)]
pub fn is_tim8_ch3(&self) -> bool {
*self == DMAREQ_ID::Tim8Ch3
}
#[inline(always)]
pub fn is_tim8_ch4(&self) -> bool {
*self == DMAREQ_ID::Tim8Ch4
}
#[inline(always)]
pub fn is_tim8_up(&self) -> bool {
*self == DMAREQ_ID::Tim8Up
}
#[inline(always)]
pub fn is_tim8_trig(&self) -> bool {
*self == DMAREQ_ID::Tim8Trig
}
#[inline(always)]
pub fn is_tim8_com(&self) -> bool {
*self == DMAREQ_ID::Tim8Com
}
#[inline(always)]
pub fn is_tim5_ch1(&self) -> bool {
*self == DMAREQ_ID::Tim5Ch1
}
#[inline(always)]
pub fn is_tim5_ch2(&self) -> bool {
*self == DMAREQ_ID::Tim5Ch2
}
#[inline(always)]
pub fn is_tim5_ch3(&self) -> bool {
*self == DMAREQ_ID::Tim5Ch3
}
#[inline(always)]
pub fn is_tim5_ch4(&self) -> bool {
*self == DMAREQ_ID::Tim5Ch4
}
#[inline(always)]
pub fn is_tim5_up(&self) -> bool {
*self == DMAREQ_ID::Tim5Up
}
#[inline(always)]
pub fn is_tim5_trig(&self) -> bool {
*self == DMAREQ_ID::Tim5Trig
}
#[inline(always)]
pub fn is_spi3_rx_dma(&self) -> bool {
*self == DMAREQ_ID::Spi3RxDma
}
#[inline(always)]
pub fn is_spi3_tx_dma(&self) -> bool {
*self == DMAREQ_ID::Spi3TxDma
}
#[inline(always)]
pub fn is_uart4_rx_dma(&self) -> bool {
*self == DMAREQ_ID::Uart4RxDma
}
#[inline(always)]
pub fn is_uart4_tx_dma(&self) -> bool {
*self == DMAREQ_ID::Uart4TxDma
}
#[inline(always)]
pub fn is_uart5_rx_dma(&self) -> bool {
*self == DMAREQ_ID::Uart5RxDma
}
#[inline(always)]
pub fn is_uart5_tx_dma(&self) -> bool {
*self == DMAREQ_ID::Uart5TxDma
}
#[inline(always)]
pub fn is_dac_ch1_dma(&self) -> bool {
*self == DMAREQ_ID::DacCh1Dma
}
#[inline(always)]
pub fn is_dac_ch2_dma(&self) -> bool {
*self == DMAREQ_ID::DacCh2Dma
}
#[inline(always)]
pub fn is_tim6_up(&self) -> bool {
*self == DMAREQ_ID::Tim6Up
}
#[inline(always)]
pub fn is_tim7_up(&self) -> bool {
*self == DMAREQ_ID::Tim7Up
}
#[inline(always)]
pub fn is_usart6_rx_dma(&self) -> bool {
*self == DMAREQ_ID::Usart6RxDma
}
#[inline(always)]
pub fn is_usart6_tx_dma(&self) -> bool {
*self == DMAREQ_ID::Usart6TxDma
}
#[inline(always)]
pub fn is_i2c3_rx_dma(&self) -> bool {
*self == DMAREQ_ID::I2c3RxDma
}
#[inline(always)]
pub fn is_i2c3_tx_dma(&self) -> bool {
*self == DMAREQ_ID::I2c3TxDma
}
#[inline(always)]
pub fn is_dcmi_dma(&self) -> bool {
*self == DMAREQ_ID::DcmiDma
}
#[inline(always)]
pub fn is_cryp_in_dma(&self) -> bool {
*self == DMAREQ_ID::CrypInDma
}
#[inline(always)]
pub fn is_cryp_out_dma(&self) -> bool {
*self == DMAREQ_ID::CrypOutDma
}
#[inline(always)]
pub fn is_hash_in_dma(&self) -> bool {
*self == DMAREQ_ID::HashInDma
}
#[inline(always)]
pub fn is_uart7_rx_dma(&self) -> bool {
*self == DMAREQ_ID::Uart7RxDma
}
#[inline(always)]
pub fn is_uart7_tx_dma(&self) -> bool {
*self == DMAREQ_ID::Uart7TxDma
}
#[inline(always)]
pub fn is_uart8_rx_dma(&self) -> bool {
*self == DMAREQ_ID::Uart8RxDma
}
#[inline(always)]
pub fn is_uart8_tx_dma(&self) -> bool {
*self == DMAREQ_ID::Uart8TxDma
}
#[inline(always)]
pub fn is_spi4_rx_dma(&self) -> bool {
*self == DMAREQ_ID::Spi4RxDma
}
#[inline(always)]
pub fn is_spi4_tx_dma(&self) -> bool {
*self == DMAREQ_ID::Spi4TxDma
}
#[inline(always)]
pub fn is_spi5_rx_dma(&self) -> bool {
*self == DMAREQ_ID::Spi5RxDma
}
#[inline(always)]
pub fn is_spi5_tx_dma(&self) -> bool {
*self == DMAREQ_ID::Spi5TxDma
}
#[inline(always)]
pub fn is_sai1a_dma(&self) -> bool {
*self == DMAREQ_ID::Sai1aDma
}
#[inline(always)]
pub fn is_sai1b_dma(&self) -> bool {
*self == DMAREQ_ID::Sai1bDma
}
#[inline(always)]
pub fn is_sai2a_dma(&self) -> bool {
*self == DMAREQ_ID::Sai2aDma
}
#[inline(always)]
pub fn is_sai2b_dma(&self) -> bool {
*self == DMAREQ_ID::Sai2bDma
}
#[inline(always)]
pub fn is_swpmi_rx_dma(&self) -> bool {
*self == DMAREQ_ID::SwpmiRxDma
}
#[inline(always)]
pub fn is_swpmi_tx_dma(&self) -> bool {
*self == DMAREQ_ID::SwpmiTxDma
}
#[inline(always)]
pub fn is_spdifrx_dat_dma(&self) -> bool {
*self == DMAREQ_ID::SpdifrxDatDma
}
#[inline(always)]
pub fn is_spdifrx_ctrl_dma(&self) -> bool {
*self == DMAREQ_ID::SpdifrxCtrlDma
}
#[inline(always)]
pub fn is_hr_req1(&self) -> bool {
*self == DMAREQ_ID::HrReq1
}
#[inline(always)]
pub fn is_hr_req2(&self) -> bool {
*self == DMAREQ_ID::HrReq2
}
#[inline(always)]
pub fn is_hr_req3(&self) -> bool {
*self == DMAREQ_ID::HrReq3
}
#[inline(always)]
pub fn is_hr_req4(&self) -> bool {
*self == DMAREQ_ID::HrReq4
}
#[inline(always)]
pub fn is_hr_req5(&self) -> bool {
*self == DMAREQ_ID::HrReq5
}
#[inline(always)]
pub fn is_hr_req6(&self) -> bool {
*self == DMAREQ_ID::HrReq6
}
#[inline(always)]
pub fn is_dfsdm1_dma0(&self) -> bool {
*self == DMAREQ_ID::Dfsdm1Dma0
}
#[inline(always)]
pub fn is_dfsdm1_dma1(&self) -> bool {
*self == DMAREQ_ID::Dfsdm1Dma1
}
#[inline(always)]
pub fn is_dfsdm1_dma2(&self) -> bool {
*self == DMAREQ_ID::Dfsdm1Dma2
}
#[inline(always)]
pub fn is_dfsdm1_dma3(&self) -> bool {
*self == DMAREQ_ID::Dfsdm1Dma3
}
#[inline(always)]
pub fn is_tim15_ch1(&self) -> bool {
*self == DMAREQ_ID::Tim15Ch1
}
#[inline(always)]
pub fn is_tim15_up(&self) -> bool {
*self == DMAREQ_ID::Tim15Up
}
#[inline(always)]
pub fn is_tim15_trig(&self) -> bool {
*self == DMAREQ_ID::Tim15Trig
}
#[inline(always)]
pub fn is_tim15_com(&self) -> bool {
*self == DMAREQ_ID::Tim15Com
}
#[inline(always)]
pub fn is_tim16_ch1(&self) -> bool {
*self == DMAREQ_ID::Tim16Ch1
}
#[inline(always)]
pub fn is_tim16_up(&self) -> bool {
*self == DMAREQ_ID::Tim16Up
}
#[inline(always)]
pub fn is_tim17_ch1(&self) -> bool {
*self == DMAREQ_ID::Tim17Ch1
}
#[inline(always)]
pub fn is_tim17_up(&self) -> bool {
*self == DMAREQ_ID::Tim17Up
}
#[inline(always)]
pub fn is_sai3_a_dma(&self) -> bool {
*self == DMAREQ_ID::Sai3ADma
}
#[inline(always)]
pub fn is_sai3_b_dma(&self) -> bool {
*self == DMAREQ_ID::Sai3BDma
}
#[inline(always)]
pub fn is_adc3_dma(&self) -> bool {
*self == DMAREQ_ID::Adc3Dma
}
}
pub type DMAREQ_ID_W<'a, REG> = crate::FieldWriter<'a, REG, 7, DMAREQ_ID>;
impl<'a, REG> DMAREQ_ID_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn none(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::None)
}
#[inline(always)]
pub fn dmamux1_req_gen0(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Dmamux1ReqGen0)
}
#[inline(always)]
pub fn dmamux1_req_gen1(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Dmamux1ReqGen1)
}
#[inline(always)]
pub fn dmamux1_req_gen2(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Dmamux1ReqGen2)
}
#[inline(always)]
pub fn dmamux1_req_gen3(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Dmamux1ReqGen3)
}
#[inline(always)]
pub fn dmamux1_req_gen4(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Dmamux1ReqGen4)
}
#[inline(always)]
pub fn dmamux1_req_gen5(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Dmamux1ReqGen5)
}
#[inline(always)]
pub fn dmamux1_req_gen6(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Dmamux1ReqGen6)
}
#[inline(always)]
pub fn dmamux1_req_gen7(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Dmamux1ReqGen7)
}
#[inline(always)]
pub fn adc1_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Adc1Dma)
}
#[inline(always)]
pub fn adc2_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Adc2Dma)
}
#[inline(always)]
pub fn tim1_ch1(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim1Ch1)
}
#[inline(always)]
pub fn tim1_ch2(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim1Ch2)
}
#[inline(always)]
pub fn tim1_ch3(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim1Ch3)
}
#[inline(always)]
pub fn tim1_ch4(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim1Ch4)
}
#[inline(always)]
pub fn tim1_up(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim1Up)
}
#[inline(always)]
pub fn tim1_trig(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim1Trig)
}
#[inline(always)]
pub fn tim1_com(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim1Com)
}
#[inline(always)]
pub fn tim2_ch1(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim2Ch1)
}
#[inline(always)]
pub fn tim2_ch2(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim2Ch2)
}
#[inline(always)]
pub fn tim2_ch3(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim2Ch3)
}
#[inline(always)]
pub fn tim2_ch4(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim2Ch4)
}
#[inline(always)]
pub fn tim2_up(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim2Up)
}
#[inline(always)]
pub fn tim3_ch1(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim3Ch1)
}
#[inline(always)]
pub fn tim3_ch2(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim3Ch2)
}
#[inline(always)]
pub fn tim3_ch3(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim3Ch3)
}
#[inline(always)]
pub fn tim3_ch4(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim3Ch4)
}
#[inline(always)]
pub fn tim3_up(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim3Up)
}
#[inline(always)]
pub fn tim3_trig(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim3Trig)
}
#[inline(always)]
pub fn tim4_ch1(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim4Ch1)
}
#[inline(always)]
pub fn tim4_ch2(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim4Ch2)
}
#[inline(always)]
pub fn tim4_ch3(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim4Ch3)
}
#[inline(always)]
pub fn tim4_up(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim4Up)
}
#[inline(always)]
pub fn i2c1_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::I2c1RxDma)
}
#[inline(always)]
pub fn i2c1_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::I2c1TxDma)
}
#[inline(always)]
pub fn i2c2_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::I2c2RxDma)
}
#[inline(always)]
pub fn i2c2_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::I2c2TxDma)
}
#[inline(always)]
pub fn spi1_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Spi1RxDma)
}
#[inline(always)]
pub fn spi1_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Spi1TxDma)
}
#[inline(always)]
pub fn spi2_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Spi2RxDma)
}
#[inline(always)]
pub fn spi2_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Spi2TxDma)
}
#[inline(always)]
pub fn usart1_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Usart1RxDma)
}
#[inline(always)]
pub fn usart1_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Usart1TxDma)
}
#[inline(always)]
pub fn usart2_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Usart2RxDma)
}
#[inline(always)]
pub fn usart2_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Usart2TxDma)
}
#[inline(always)]
pub fn usart3_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Usart3RxDma)
}
#[inline(always)]
pub fn usart3_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Usart3TxDma)
}
#[inline(always)]
pub fn tim8_ch1(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim8Ch1)
}
#[inline(always)]
pub fn tim8_ch2(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim8Ch2)
}
#[inline(always)]
pub fn tim8_ch3(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim8Ch3)
}
#[inline(always)]
pub fn tim8_ch4(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim8Ch4)
}
#[inline(always)]
pub fn tim8_up(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim8Up)
}
#[inline(always)]
pub fn tim8_trig(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim8Trig)
}
#[inline(always)]
pub fn tim8_com(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim8Com)
}
#[inline(always)]
pub fn tim5_ch1(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim5Ch1)
}
#[inline(always)]
pub fn tim5_ch2(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim5Ch2)
}
#[inline(always)]
pub fn tim5_ch3(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim5Ch3)
}
#[inline(always)]
pub fn tim5_ch4(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim5Ch4)
}
#[inline(always)]
pub fn tim5_up(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim5Up)
}
#[inline(always)]
pub fn tim5_trig(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim5Trig)
}
#[inline(always)]
pub fn spi3_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Spi3RxDma)
}
#[inline(always)]
pub fn spi3_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Spi3TxDma)
}
#[inline(always)]
pub fn uart4_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Uart4RxDma)
}
#[inline(always)]
pub fn uart4_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Uart4TxDma)
}
#[inline(always)]
pub fn uart5_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Uart5RxDma)
}
#[inline(always)]
pub fn uart5_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Uart5TxDma)
}
#[inline(always)]
pub fn dac_ch1_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::DacCh1Dma)
}
#[inline(always)]
pub fn dac_ch2_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::DacCh2Dma)
}
#[inline(always)]
pub fn tim6_up(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim6Up)
}
#[inline(always)]
pub fn tim7_up(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim7Up)
}
#[inline(always)]
pub fn usart6_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Usart6RxDma)
}
#[inline(always)]
pub fn usart6_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Usart6TxDma)
}
#[inline(always)]
pub fn i2c3_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::I2c3RxDma)
}
#[inline(always)]
pub fn i2c3_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::I2c3TxDma)
}
#[inline(always)]
pub fn dcmi_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::DcmiDma)
}
#[inline(always)]
pub fn cryp_in_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::CrypInDma)
}
#[inline(always)]
pub fn cryp_out_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::CrypOutDma)
}
#[inline(always)]
pub fn hash_in_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::HashInDma)
}
#[inline(always)]
pub fn uart7_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Uart7RxDma)
}
#[inline(always)]
pub fn uart7_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Uart7TxDma)
}
#[inline(always)]
pub fn uart8_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Uart8RxDma)
}
#[inline(always)]
pub fn uart8_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Uart8TxDma)
}
#[inline(always)]
pub fn spi4_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Spi4RxDma)
}
#[inline(always)]
pub fn spi4_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Spi4TxDma)
}
#[inline(always)]
pub fn spi5_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Spi5RxDma)
}
#[inline(always)]
pub fn spi5_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Spi5TxDma)
}
#[inline(always)]
pub fn sai1a_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Sai1aDma)
}
#[inline(always)]
pub fn sai1b_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Sai1bDma)
}
#[inline(always)]
pub fn sai2a_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Sai2aDma)
}
#[inline(always)]
pub fn sai2b_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Sai2bDma)
}
#[inline(always)]
pub fn swpmi_rx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::SwpmiRxDma)
}
#[inline(always)]
pub fn swpmi_tx_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::SwpmiTxDma)
}
#[inline(always)]
pub fn spdifrx_dat_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::SpdifrxDatDma)
}
#[inline(always)]
pub fn spdifrx_ctrl_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::SpdifrxCtrlDma)
}
#[inline(always)]
pub fn hr_req1(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::HrReq1)
}
#[inline(always)]
pub fn hr_req2(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::HrReq2)
}
#[inline(always)]
pub fn hr_req3(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::HrReq3)
}
#[inline(always)]
pub fn hr_req4(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::HrReq4)
}
#[inline(always)]
pub fn hr_req5(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::HrReq5)
}
#[inline(always)]
pub fn hr_req6(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::HrReq6)
}
#[inline(always)]
pub fn dfsdm1_dma0(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Dfsdm1Dma0)
}
#[inline(always)]
pub fn dfsdm1_dma1(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Dfsdm1Dma1)
}
#[inline(always)]
pub fn dfsdm1_dma2(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Dfsdm1Dma2)
}
#[inline(always)]
pub fn dfsdm1_dma3(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Dfsdm1Dma3)
}
#[inline(always)]
pub fn tim15_ch1(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim15Ch1)
}
#[inline(always)]
pub fn tim15_up(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim15Up)
}
#[inline(always)]
pub fn tim15_trig(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim15Trig)
}
#[inline(always)]
pub fn tim15_com(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim15Com)
}
#[inline(always)]
pub fn tim16_ch1(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim16Ch1)
}
#[inline(always)]
pub fn tim16_up(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim16Up)
}
#[inline(always)]
pub fn tim17_ch1(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim17Ch1)
}
#[inline(always)]
pub fn tim17_up(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Tim17Up)
}
#[inline(always)]
pub fn sai3_a_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Sai3ADma)
}
#[inline(always)]
pub fn sai3_b_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Sai3BDma)
}
#[inline(always)]
pub fn adc3_dma(self) -> &'a mut crate::W<REG> {
self.variant(DMAREQ_ID::Adc3Dma)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SOIE {
Disabled = 0,
Enabled = 1,
}
impl From<SOIE> for bool {
#[inline(always)]
fn from(variant: SOIE) -> Self {
variant as u8 != 0
}
}
pub type SOIE_R = crate::BitReader<SOIE>;
impl SOIE_R {
#[inline(always)]
pub const fn variant(&self) -> SOIE {
match self.bits {
false => SOIE::Disabled,
true => SOIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SOIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SOIE::Enabled
}
}
pub type SOIE_W<'a, REG> = crate::BitWriter<'a, REG, SOIE>;
impl<'a, REG> SOIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(SOIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(SOIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EGE {
Disabled = 0,
Enabled = 1,
}
impl From<EGE> for bool {
#[inline(always)]
fn from(variant: EGE) -> Self {
variant as u8 != 0
}
}
pub type EGE_R = crate::BitReader<EGE>;
impl EGE_R {
#[inline(always)]
pub const fn variant(&self) -> EGE {
match self.bits {
false => EGE::Disabled,
true => EGE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EGE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EGE::Enabled
}
}
pub type EGE_W<'a, REG> = crate::BitWriter<'a, REG, EGE>;
impl<'a, REG> EGE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(EGE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(EGE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SE {
Disabled = 0,
Enabled = 1,
}
impl From<SE> for bool {
#[inline(always)]
fn from(variant: SE) -> Self {
variant as u8 != 0
}
}
pub type SE_R = crate::BitReader<SE>;
impl SE_R {
#[inline(always)]
pub const fn variant(&self) -> SE {
match self.bits {
false => SE::Disabled,
true => SE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SE::Enabled
}
}
pub type SE_W<'a, REG> = crate::BitWriter<'a, REG, SE>;
impl<'a, REG> SE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(SE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(SE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum SPOL {
NoEdge = 0,
RisingEdge = 1,
FallingEdge = 2,
BothEdges = 3,
}
impl From<SPOL> for u8 {
#[inline(always)]
fn from(variant: SPOL) -> Self {
variant as _
}
}
impl crate::FieldSpec for SPOL {
type Ux = u8;
}
impl crate::IsEnum for SPOL {}
pub type SPOL_R = crate::FieldReader<SPOL>;
impl SPOL_R {
#[inline(always)]
pub const fn variant(&self) -> SPOL {
match self.bits {
0 => SPOL::NoEdge,
1 => SPOL::RisingEdge,
2 => SPOL::FallingEdge,
3 => SPOL::BothEdges,
_ => unreachable!(),
}
}
#[inline(always)]
pub fn is_no_edge(&self) -> bool {
*self == SPOL::NoEdge
}
#[inline(always)]
pub fn is_rising_edge(&self) -> bool {
*self == SPOL::RisingEdge
}
#[inline(always)]
pub fn is_falling_edge(&self) -> bool {
*self == SPOL::FallingEdge
}
#[inline(always)]
pub fn is_both_edges(&self) -> bool {
*self == SPOL::BothEdges
}
}
pub type SPOL_W<'a, REG> = crate::FieldWriter<'a, REG, 2, SPOL, crate::Safe>;
impl<'a, REG> SPOL_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn no_edge(self) -> &'a mut crate::W<REG> {
self.variant(SPOL::NoEdge)
}
#[inline(always)]
pub fn rising_edge(self) -> &'a mut crate::W<REG> {
self.variant(SPOL::RisingEdge)
}
#[inline(always)]
pub fn falling_edge(self) -> &'a mut crate::W<REG> {
self.variant(SPOL::FallingEdge)
}
#[inline(always)]
pub fn both_edges(self) -> &'a mut crate::W<REG> {
self.variant(SPOL::BothEdges)
}
}
pub type NBREQ_R = crate::FieldReader;
pub type NBREQ_W<'a, REG> = crate::FieldWriter<'a, REG, 5, u8, crate::Safe>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum SYNC_ID {
Dmamux1Evt0 = 0,
Dmamux1Evt1 = 1,
Dmamux1Evt2 = 2,
Lptim1Out = 3,
Lptim2Out = 4,
Lptim3Out = 5,
Extit0 = 6,
Tim12Trgo = 7,
}
impl From<SYNC_ID> for u8 {
#[inline(always)]
fn from(variant: SYNC_ID) -> Self {
variant as _
}
}
impl crate::FieldSpec for SYNC_ID {
type Ux = u8;
}
impl crate::IsEnum for SYNC_ID {}
pub type SYNC_ID_R = crate::FieldReader<SYNC_ID>;
impl SYNC_ID_R {
#[inline(always)]
pub const fn variant(&self) -> SYNC_ID {
match self.bits {
0 => SYNC_ID::Dmamux1Evt0,
1 => SYNC_ID::Dmamux1Evt1,
2 => SYNC_ID::Dmamux1Evt2,
3 => SYNC_ID::Lptim1Out,
4 => SYNC_ID::Lptim2Out,
5 => SYNC_ID::Lptim3Out,
6 => SYNC_ID::Extit0,
7 => SYNC_ID::Tim12Trgo,
_ => unreachable!(),
}
}
#[inline(always)]
pub fn is_dmamux1_evt0(&self) -> bool {
*self == SYNC_ID::Dmamux1Evt0
}
#[inline(always)]
pub fn is_dmamux1_evt1(&self) -> bool {
*self == SYNC_ID::Dmamux1Evt1
}
#[inline(always)]
pub fn is_dmamux1_evt2(&self) -> bool {
*self == SYNC_ID::Dmamux1Evt2
}
#[inline(always)]
pub fn is_lptim1_out(&self) -> bool {
*self == SYNC_ID::Lptim1Out
}
#[inline(always)]
pub fn is_lptim2_out(&self) -> bool {
*self == SYNC_ID::Lptim2Out
}
#[inline(always)]
pub fn is_lptim3_out(&self) -> bool {
*self == SYNC_ID::Lptim3Out
}
#[inline(always)]
pub fn is_extit0(&self) -> bool {
*self == SYNC_ID::Extit0
}
#[inline(always)]
pub fn is_tim12_trgo(&self) -> bool {
*self == SYNC_ID::Tim12Trgo
}
}
pub type SYNC_ID_W<'a, REG> = crate::FieldWriter<'a, REG, 3, SYNC_ID, crate::Safe>;
impl<'a, REG> SYNC_ID_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn dmamux1_evt0(self) -> &'a mut crate::W<REG> {
self.variant(SYNC_ID::Dmamux1Evt0)
}
#[inline(always)]
pub fn dmamux1_evt1(self) -> &'a mut crate::W<REG> {
self.variant(SYNC_ID::Dmamux1Evt1)
}
#[inline(always)]
pub fn dmamux1_evt2(self) -> &'a mut crate::W<REG> {
self.variant(SYNC_ID::Dmamux1Evt2)
}
#[inline(always)]
pub fn lptim1_out(self) -> &'a mut crate::W<REG> {
self.variant(SYNC_ID::Lptim1Out)
}
#[inline(always)]
pub fn lptim2_out(self) -> &'a mut crate::W<REG> {
self.variant(SYNC_ID::Lptim2Out)
}
#[inline(always)]
pub fn lptim3_out(self) -> &'a mut crate::W<REG> {
self.variant(SYNC_ID::Lptim3Out)
}
#[inline(always)]
pub fn extit0(self) -> &'a mut crate::W<REG> {
self.variant(SYNC_ID::Extit0)
}
#[inline(always)]
pub fn tim12_trgo(self) -> &'a mut crate::W<REG> {
self.variant(SYNC_ID::Tim12Trgo)
}
}
impl R {
#[inline(always)]
pub fn dmareq_id(&self) -> DMAREQ_ID_R {
DMAREQ_ID_R::new((self.bits & 0x7f) as u8)
}
#[inline(always)]
pub fn soie(&self) -> SOIE_R {
SOIE_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn ege(&self) -> EGE_R {
EGE_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn se(&self) -> SE_R {
SE_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn spol(&self) -> SPOL_R {
SPOL_R::new(((self.bits >> 17) & 3) as u8)
}
#[inline(always)]
pub fn nbreq(&self) -> NBREQ_R {
NBREQ_R::new(((self.bits >> 19) & 0x1f) as u8)
}
#[inline(always)]
pub fn sync_id(&self) -> SYNC_ID_R {
SYNC_ID_R::new(((self.bits >> 24) & 7) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CCR")
.field("dmareq_id", &self.dmareq_id())
.field("soie", &self.soie())
.field("ege", &self.ege())
.field("se", &self.se())
.field("spol", &self.spol())
.field("nbreq", &self.nbreq())
.field("sync_id", &self.sync_id())
.finish()
}
}
impl W {
#[inline(always)]
pub fn dmareq_id(&mut self) -> DMAREQ_ID_W<CCRrs> {
DMAREQ_ID_W::new(self, 0)
}
#[inline(always)]
pub fn soie(&mut self) -> SOIE_W<CCRrs> {
SOIE_W::new(self, 8)
}
#[inline(always)]
pub fn ege(&mut self) -> EGE_W<CCRrs> {
EGE_W::new(self, 9)
}
#[inline(always)]
pub fn se(&mut self) -> SE_W<CCRrs> {
SE_W::new(self, 16)
}
#[inline(always)]
pub fn spol(&mut self) -> SPOL_W<CCRrs> {
SPOL_W::new(self, 17)
}
#[inline(always)]
pub fn nbreq(&mut self) -> NBREQ_W<CCRrs> {
NBREQ_W::new(self, 19)
}
#[inline(always)]
pub fn sync_id(&mut self) -> SYNC_ID_W<CCRrs> {
SYNC_ID_W::new(self, 24)
}
}
pub struct CCRrs;
impl crate::RegisterSpec for CCRrs {
type Ux = u32;
}
impl crate::Readable for CCRrs {}
impl crate::Writable for CCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CCRrs {}