rp2040_pac/pio0/
sm.rs

1#[doc = r"Register block"]
2#[repr(C)]
3pub struct SM {
4    sm_clkdiv: SM_CLKDIV,
5    sm_execctrl: SM_EXECCTRL,
6    sm_shiftctrl: SM_SHIFTCTRL,
7    sm_addr: SM_ADDR,
8    sm_instr: SM_INSTR,
9    sm_pinctrl: SM_PINCTRL,
10}
11impl SM {
12    #[doc = "0x00 - Clock divisor register for state machine 0  
13 Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256)"]
14    #[inline(always)]
15    pub const fn sm_clkdiv(&self) -> &SM_CLKDIV {
16        &self.sm_clkdiv
17    }
18    #[doc = "0x04 - Execution/behavioural settings for state machine 0"]
19    #[inline(always)]
20    pub const fn sm_execctrl(&self) -> &SM_EXECCTRL {
21        &self.sm_execctrl
22    }
23    #[doc = "0x08 - Control behaviour of the input/output shift registers for state machine 0"]
24    #[inline(always)]
25    pub const fn sm_shiftctrl(&self) -> &SM_SHIFTCTRL {
26        &self.sm_shiftctrl
27    }
28    #[doc = "0x0c - Current instruction address of state machine 0"]
29    #[inline(always)]
30    pub const fn sm_addr(&self) -> &SM_ADDR {
31        &self.sm_addr
32    }
33    #[doc = "0x10 - Read to see the instruction currently addressed by state machine 0's program counter  
34 Write to execute an instruction immediately (including jumps) and then resume execution."]
35    #[inline(always)]
36    pub const fn sm_instr(&self) -> &SM_INSTR {
37        &self.sm_instr
38    }
39    #[doc = "0x14 - State machine pin control"]
40    #[inline(always)]
41    pub const fn sm_pinctrl(&self) -> &SM_PINCTRL {
42        &self.sm_pinctrl
43    }
44}
45#[doc = "SM_CLKDIV (rw) register accessor: Clock divisor register for state machine 0  
46 Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256)  
47
48You can [`read`](crate::generic::Reg::read) this register and get [`sm_clkdiv::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`sm_clkdiv::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).  
49
50For information about available fields see [`mod@sm_clkdiv`]
51module"]
52pub type SM_CLKDIV = crate::Reg<sm_clkdiv::SM_CLKDIV_SPEC>;
53#[doc = "Clock divisor register for state machine 0  
54 Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256)"]
55pub mod sm_clkdiv;
56#[doc = "SM_EXECCTRL (rw) register accessor: Execution/behavioural settings for state machine 0  
57
58You can [`read`](crate::generic::Reg::read) this register and get [`sm_execctrl::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`sm_execctrl::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).  
59
60For information about available fields see [`mod@sm_execctrl`]
61module"]
62pub type SM_EXECCTRL = crate::Reg<sm_execctrl::SM_EXECCTRL_SPEC>;
63#[doc = "Execution/behavioural settings for state machine 0"]
64pub mod sm_execctrl;
65#[doc = "SM_SHIFTCTRL (rw) register accessor: Control behaviour of the input/output shift registers for state machine 0  
66
67You can [`read`](crate::generic::Reg::read) this register and get [`sm_shiftctrl::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`sm_shiftctrl::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).  
68
69For information about available fields see [`mod@sm_shiftctrl`]
70module"]
71pub type SM_SHIFTCTRL = crate::Reg<sm_shiftctrl::SM_SHIFTCTRL_SPEC>;
72#[doc = "Control behaviour of the input/output shift registers for state machine 0"]
73pub mod sm_shiftctrl;
74#[doc = "SM_ADDR (r) register accessor: Current instruction address of state machine 0  
75
76You can [`read`](crate::generic::Reg::read) this register and get [`sm_addr::R`].  See [API](https://docs.rs/svd2rust/#read--modify--write-api).  
77
78For information about available fields see [`mod@sm_addr`]
79module"]
80pub type SM_ADDR = crate::Reg<sm_addr::SM_ADDR_SPEC>;
81#[doc = "Current instruction address of state machine 0"]
82pub mod sm_addr;
83#[doc = "SM_INSTR (rw) register accessor: Read to see the instruction currently addressed by state machine 0's program counter  
84 Write to execute an instruction immediately (including jumps) and then resume execution.  
85
86You can [`read`](crate::generic::Reg::read) this register and get [`sm_instr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`sm_instr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).  
87
88For information about available fields see [`mod@sm_instr`]
89module"]
90pub type SM_INSTR = crate::Reg<sm_instr::SM_INSTR_SPEC>;
91#[doc = "Read to see the instruction currently addressed by state machine 0's program counter  
92 Write to execute an instruction immediately (including jumps) and then resume execution."]
93pub mod sm_instr;
94#[doc = "SM_PINCTRL (rw) register accessor: State machine pin control  
95
96You can [`read`](crate::generic::Reg::read) this register and get [`sm_pinctrl::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`sm_pinctrl::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).  
97
98For information about available fields see [`mod@sm_pinctrl`]
99module"]
100pub type SM_PINCTRL = crate::Reg<sm_pinctrl::SM_PINCTRL_SPEC>;
101#[doc = "State machine pin control"]
102pub mod sm_pinctrl;