nrf5340_app_pac/
twim0_ns.rs1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4 #[doc = "0x00 - Start TWI receive sequence"]
5 pub tasks_startrx: TASKS_STARTRX,
6 _reserved1: [u8; 0x04],
7 #[doc = "0x08 - Start TWI transmit sequence"]
8 pub tasks_starttx: TASKS_STARTTX,
9 _reserved2: [u8; 0x08],
10 #[doc = "0x14 - Stop TWI transaction. Must be issued while the TWI master is not suspended."]
11 pub tasks_stop: TASKS_STOP,
12 _reserved3: [u8; 0x04],
13 #[doc = "0x1c - Suspend TWI transaction"]
14 pub tasks_suspend: TASKS_SUSPEND,
15 #[doc = "0x20 - Resume TWI transaction"]
16 pub tasks_resume: TASKS_RESUME,
17 _reserved5: [u8; 0x5c],
18 #[doc = "0x80 - Subscribe configuration for task STARTRX"]
19 pub subscribe_startrx: SUBSCRIBE_STARTRX,
20 _reserved6: [u8; 0x04],
21 #[doc = "0x88 - Subscribe configuration for task STARTTX"]
22 pub subscribe_starttx: SUBSCRIBE_STARTTX,
23 _reserved7: [u8; 0x08],
24 #[doc = "0x94 - Subscribe configuration for task STOP"]
25 pub subscribe_stop: SUBSCRIBE_STOP,
26 _reserved8: [u8; 0x04],
27 #[doc = "0x9c - Subscribe configuration for task SUSPEND"]
28 pub subscribe_suspend: SUBSCRIBE_SUSPEND,
29 #[doc = "0xa0 - Subscribe configuration for task RESUME"]
30 pub subscribe_resume: SUBSCRIBE_RESUME,
31 _reserved10: [u8; 0x60],
32 #[doc = "0x104 - TWI stopped"]
33 pub events_stopped: EVENTS_STOPPED,
34 _reserved11: [u8; 0x1c],
35 #[doc = "0x124 - TWI error"]
36 pub events_error: EVENTS_ERROR,
37 _reserved12: [u8; 0x20],
38 #[doc = "0x148 - SUSPEND task has been issued, TWI traffic is now suspended."]
39 pub events_suspended: EVENTS_SUSPENDED,
40 #[doc = "0x14c - Receive sequence started"]
41 pub events_rxstarted: EVENTS_RXSTARTED,
42 #[doc = "0x150 - Transmit sequence started"]
43 pub events_txstarted: EVENTS_TXSTARTED,
44 _reserved15: [u8; 0x08],
45 #[doc = "0x15c - Byte boundary, starting to receive the last byte"]
46 pub events_lastrx: EVENTS_LASTRX,
47 #[doc = "0x160 - Byte boundary, starting to transmit the last byte"]
48 pub events_lasttx: EVENTS_LASTTX,
49 _reserved17: [u8; 0x20],
50 #[doc = "0x184 - Publish configuration for event STOPPED"]
51 pub publish_stopped: PUBLISH_STOPPED,
52 _reserved18: [u8; 0x1c],
53 #[doc = "0x1a4 - Publish configuration for event ERROR"]
54 pub publish_error: PUBLISH_ERROR,
55 _reserved19: [u8; 0x20],
56 #[doc = "0x1c8 - Publish configuration for event SUSPENDED"]
57 pub publish_suspended: PUBLISH_SUSPENDED,
58 #[doc = "0x1cc - Publish configuration for event RXSTARTED"]
59 pub publish_rxstarted: PUBLISH_RXSTARTED,
60 #[doc = "0x1d0 - Publish configuration for event TXSTARTED"]
61 pub publish_txstarted: PUBLISH_TXSTARTED,
62 _reserved22: [u8; 0x08],
63 #[doc = "0x1dc - Publish configuration for event LASTRX"]
64 pub publish_lastrx: PUBLISH_LASTRX,
65 #[doc = "0x1e0 - Publish configuration for event LASTTX"]
66 pub publish_lasttx: PUBLISH_LASTTX,
67 _reserved24: [u8; 0x1c],
68 #[doc = "0x200 - Shortcuts between local events and tasks"]
69 pub shorts: SHORTS,
70 _reserved25: [u8; 0xfc],
71 #[doc = "0x300 - Enable or disable interrupt"]
72 pub inten: INTEN,
73 #[doc = "0x304 - Enable interrupt"]
74 pub intenset: INTENSET,
75 #[doc = "0x308 - Disable interrupt"]
76 pub intenclr: INTENCLR,
77 _reserved28: [u8; 0x01b8],
78 #[doc = "0x4c4 - Error source"]
79 pub errorsrc: ERRORSRC,
80 _reserved29: [u8; 0x38],
81 #[doc = "0x500 - Enable TWIM"]
82 pub enable: ENABLE,
83 _reserved30: [u8; 0x04],
84 #[doc = "0x508..0x510 - Unspecified"]
85 pub psel: PSEL,
86 _reserved31: [u8; 0x14],
87 #[doc = "0x524 - TWI frequency. Accuracy depends on the HFCLK source selected."]
88 pub frequency: FREQUENCY,
89 _reserved32: [u8; 0x0c],
90 #[doc = "0x534..0x544 - RXD EasyDMA channel"]
91 pub rxd: RXD,
92 #[doc = "0x544..0x554 - TXD EasyDMA channel"]
93 pub txd: TXD,
94 _reserved34: [u8; 0x34],
95 #[doc = "0x588 - Address used in the TWI transfer"]
96 pub address: ADDRESS,
97}
98#[doc = "TASKS_STARTRX (w) register accessor: an alias for `Reg<TASKS_STARTRX_SPEC>`"]
99pub type TASKS_STARTRX = crate::Reg<tasks_startrx::TASKS_STARTRX_SPEC>;
100#[doc = "Start TWI receive sequence"]
101pub mod tasks_startrx;
102#[doc = "TASKS_STARTTX (w) register accessor: an alias for `Reg<TASKS_STARTTX_SPEC>`"]
103pub type TASKS_STARTTX = crate::Reg<tasks_starttx::TASKS_STARTTX_SPEC>;
104#[doc = "Start TWI transmit sequence"]
105pub mod tasks_starttx;
106#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
107pub type TASKS_STOP = crate::Reg<tasks_stop::TASKS_STOP_SPEC>;
108#[doc = "Stop TWI transaction. Must be issued while the TWI master is not suspended."]
109pub mod tasks_stop;
110#[doc = "TASKS_SUSPEND (w) register accessor: an alias for `Reg<TASKS_SUSPEND_SPEC>`"]
111pub type TASKS_SUSPEND = crate::Reg<tasks_suspend::TASKS_SUSPEND_SPEC>;
112#[doc = "Suspend TWI transaction"]
113pub mod tasks_suspend;
114#[doc = "TASKS_RESUME (w) register accessor: an alias for `Reg<TASKS_RESUME_SPEC>`"]
115pub type TASKS_RESUME = crate::Reg<tasks_resume::TASKS_RESUME_SPEC>;
116#[doc = "Resume TWI transaction"]
117pub mod tasks_resume;
118#[doc = "SUBSCRIBE_STARTRX (rw) register accessor: an alias for `Reg<SUBSCRIBE_STARTRX_SPEC>`"]
119pub type SUBSCRIBE_STARTRX = crate::Reg<subscribe_startrx::SUBSCRIBE_STARTRX_SPEC>;
120#[doc = "Subscribe configuration for task STARTRX"]
121pub mod subscribe_startrx;
122#[doc = "SUBSCRIBE_STARTTX (rw) register accessor: an alias for `Reg<SUBSCRIBE_STARTTX_SPEC>`"]
123pub type SUBSCRIBE_STARTTX = crate::Reg<subscribe_starttx::SUBSCRIBE_STARTTX_SPEC>;
124#[doc = "Subscribe configuration for task STARTTX"]
125pub mod subscribe_starttx;
126#[doc = "SUBSCRIBE_STOP (rw) register accessor: an alias for `Reg<SUBSCRIBE_STOP_SPEC>`"]
127pub type SUBSCRIBE_STOP = crate::Reg<subscribe_stop::SUBSCRIBE_STOP_SPEC>;
128#[doc = "Subscribe configuration for task STOP"]
129pub mod subscribe_stop;
130#[doc = "SUBSCRIBE_SUSPEND (rw) register accessor: an alias for `Reg<SUBSCRIBE_SUSPEND_SPEC>`"]
131pub type SUBSCRIBE_SUSPEND = crate::Reg<subscribe_suspend::SUBSCRIBE_SUSPEND_SPEC>;
132#[doc = "Subscribe configuration for task SUSPEND"]
133pub mod subscribe_suspend;
134#[doc = "SUBSCRIBE_RESUME (rw) register accessor: an alias for `Reg<SUBSCRIBE_RESUME_SPEC>`"]
135pub type SUBSCRIBE_RESUME = crate::Reg<subscribe_resume::SUBSCRIBE_RESUME_SPEC>;
136#[doc = "Subscribe configuration for task RESUME"]
137pub mod subscribe_resume;
138#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg<EVENTS_STOPPED_SPEC>`"]
139pub type EVENTS_STOPPED = crate::Reg<events_stopped::EVENTS_STOPPED_SPEC>;
140#[doc = "TWI stopped"]
141pub mod events_stopped;
142#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg<EVENTS_ERROR_SPEC>`"]
143pub type EVENTS_ERROR = crate::Reg<events_error::EVENTS_ERROR_SPEC>;
144#[doc = "TWI error"]
145pub mod events_error;
146#[doc = "EVENTS_SUSPENDED (rw) register accessor: an alias for `Reg<EVENTS_SUSPENDED_SPEC>`"]
147pub type EVENTS_SUSPENDED = crate::Reg<events_suspended::EVENTS_SUSPENDED_SPEC>;
148#[doc = "SUSPEND task has been issued, TWI traffic is now suspended."]
149pub mod events_suspended;
150#[doc = "EVENTS_RXSTARTED (rw) register accessor: an alias for `Reg<EVENTS_RXSTARTED_SPEC>`"]
151pub type EVENTS_RXSTARTED = crate::Reg<events_rxstarted::EVENTS_RXSTARTED_SPEC>;
152#[doc = "Receive sequence started"]
153pub mod events_rxstarted;
154#[doc = "EVENTS_TXSTARTED (rw) register accessor: an alias for `Reg<EVENTS_TXSTARTED_SPEC>`"]
155pub type EVENTS_TXSTARTED = crate::Reg<events_txstarted::EVENTS_TXSTARTED_SPEC>;
156#[doc = "Transmit sequence started"]
157pub mod events_txstarted;
158#[doc = "EVENTS_LASTRX (rw) register accessor: an alias for `Reg<EVENTS_LASTRX_SPEC>`"]
159pub type EVENTS_LASTRX = crate::Reg<events_lastrx::EVENTS_LASTRX_SPEC>;
160#[doc = "Byte boundary, starting to receive the last byte"]
161pub mod events_lastrx;
162#[doc = "EVENTS_LASTTX (rw) register accessor: an alias for `Reg<EVENTS_LASTTX_SPEC>`"]
163pub type EVENTS_LASTTX = crate::Reg<events_lasttx::EVENTS_LASTTX_SPEC>;
164#[doc = "Byte boundary, starting to transmit the last byte"]
165pub mod events_lasttx;
166#[doc = "PUBLISH_STOPPED (rw) register accessor: an alias for `Reg<PUBLISH_STOPPED_SPEC>`"]
167pub type PUBLISH_STOPPED = crate::Reg<publish_stopped::PUBLISH_STOPPED_SPEC>;
168#[doc = "Publish configuration for event STOPPED"]
169pub mod publish_stopped;
170#[doc = "PUBLISH_ERROR (rw) register accessor: an alias for `Reg<PUBLISH_ERROR_SPEC>`"]
171pub type PUBLISH_ERROR = crate::Reg<publish_error::PUBLISH_ERROR_SPEC>;
172#[doc = "Publish configuration for event ERROR"]
173pub mod publish_error;
174#[doc = "PUBLISH_SUSPENDED (rw) register accessor: an alias for `Reg<PUBLISH_SUSPENDED_SPEC>`"]
175pub type PUBLISH_SUSPENDED = crate::Reg<publish_suspended::PUBLISH_SUSPENDED_SPEC>;
176#[doc = "Publish configuration for event SUSPENDED"]
177pub mod publish_suspended;
178#[doc = "PUBLISH_RXSTARTED (rw) register accessor: an alias for `Reg<PUBLISH_RXSTARTED_SPEC>`"]
179pub type PUBLISH_RXSTARTED = crate::Reg<publish_rxstarted::PUBLISH_RXSTARTED_SPEC>;
180#[doc = "Publish configuration for event RXSTARTED"]
181pub mod publish_rxstarted;
182#[doc = "PUBLISH_TXSTARTED (rw) register accessor: an alias for `Reg<PUBLISH_TXSTARTED_SPEC>`"]
183pub type PUBLISH_TXSTARTED = crate::Reg<publish_txstarted::PUBLISH_TXSTARTED_SPEC>;
184#[doc = "Publish configuration for event TXSTARTED"]
185pub mod publish_txstarted;
186#[doc = "PUBLISH_LASTRX (rw) register accessor: an alias for `Reg<PUBLISH_LASTRX_SPEC>`"]
187pub type PUBLISH_LASTRX = crate::Reg<publish_lastrx::PUBLISH_LASTRX_SPEC>;
188#[doc = "Publish configuration for event LASTRX"]
189pub mod publish_lastrx;
190#[doc = "PUBLISH_LASTTX (rw) register accessor: an alias for `Reg<PUBLISH_LASTTX_SPEC>`"]
191pub type PUBLISH_LASTTX = crate::Reg<publish_lasttx::PUBLISH_LASTTX_SPEC>;
192#[doc = "Publish configuration for event LASTTX"]
193pub mod publish_lasttx;
194#[doc = "SHORTS (rw) register accessor: an alias for `Reg<SHORTS_SPEC>`"]
195pub type SHORTS = crate::Reg<shorts::SHORTS_SPEC>;
196#[doc = "Shortcuts between local events and tasks"]
197pub mod shorts;
198#[doc = "INTEN (rw) register accessor: an alias for `Reg<INTEN_SPEC>`"]
199pub type INTEN = crate::Reg<inten::INTEN_SPEC>;
200#[doc = "Enable or disable interrupt"]
201pub mod inten;
202#[doc = "INTENSET (rw) register accessor: an alias for `Reg<INTENSET_SPEC>`"]
203pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
204#[doc = "Enable interrupt"]
205pub mod intenset;
206#[doc = "INTENCLR (rw) register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
207pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
208#[doc = "Disable interrupt"]
209pub mod intenclr;
210#[doc = "ERRORSRC (rw) register accessor: an alias for `Reg<ERRORSRC_SPEC>`"]
211pub type ERRORSRC = crate::Reg<errorsrc::ERRORSRC_SPEC>;
212#[doc = "Error source"]
213pub mod errorsrc;
214#[doc = "ENABLE (rw) register accessor: an alias for `Reg<ENABLE_SPEC>`"]
215pub type ENABLE = crate::Reg<enable::ENABLE_SPEC>;
216#[doc = "Enable TWIM"]
217pub mod enable;
218#[doc = "Unspecified"]
219pub use psel::PSEL;
220#[doc = r"Cluster"]
221#[doc = "Unspecified"]
222pub mod psel;
223#[doc = "FREQUENCY (rw) register accessor: an alias for `Reg<FREQUENCY_SPEC>`"]
224pub type FREQUENCY = crate::Reg<frequency::FREQUENCY_SPEC>;
225#[doc = "TWI frequency. Accuracy depends on the HFCLK source selected."]
226pub mod frequency;
227#[doc = "RXD EasyDMA channel"]
228pub use rxd::RXD;
229#[doc = r"Cluster"]
230#[doc = "RXD EasyDMA channel"]
231pub mod rxd;
232#[doc = "TXD EasyDMA channel"]
233pub use txd::TXD;
234#[doc = r"Cluster"]
235#[doc = "TXD EasyDMA channel"]
236pub mod txd;
237#[doc = "ADDRESS (rw) register accessor: an alias for `Reg<ADDRESS_SPEC>`"]
238pub type ADDRESS = crate::Reg<address::ADDRESS_SPEC>;
239#[doc = "Address used in the TWI transfer"]
240pub mod address;