nrf52840_pac/
twim0.rs
1#[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; 0xe0],
18 #[doc = "0x104 - TWI stopped"]
19 pub events_stopped: EVENTS_STOPPED,
20 _reserved6: [u8; 0x1c],
21 #[doc = "0x124 - TWI error"]
22 pub events_error: EVENTS_ERROR,
23 _reserved7: [u8; 0x20],
24 #[doc = "0x148 - Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended."]
25 pub events_suspended: EVENTS_SUSPENDED,
26 #[doc = "0x14c - Receive sequence started"]
27 pub events_rxstarted: EVENTS_RXSTARTED,
28 #[doc = "0x150 - Transmit sequence started"]
29 pub events_txstarted: EVENTS_TXSTARTED,
30 _reserved10: [u8; 0x08],
31 #[doc = "0x15c - Byte boundary, starting to receive the last byte"]
32 pub events_lastrx: EVENTS_LASTRX,
33 #[doc = "0x160 - Byte boundary, starting to transmit the last byte"]
34 pub events_lasttx: EVENTS_LASTTX,
35 _reserved12: [u8; 0x9c],
36 #[doc = "0x200 - Shortcut register"]
37 pub shorts: SHORTS,
38 _reserved13: [u8; 0xfc],
39 #[doc = "0x300 - Enable or disable interrupt"]
40 pub inten: INTEN,
41 #[doc = "0x304 - Enable interrupt"]
42 pub intenset: INTENSET,
43 #[doc = "0x308 - Disable interrupt"]
44 pub intenclr: INTENCLR,
45 _reserved16: [u8; 0x01b8],
46 #[doc = "0x4c4 - Error source"]
47 pub errorsrc: ERRORSRC,
48 _reserved17: [u8; 0x38],
49 #[doc = "0x500 - Enable TWIM"]
50 pub enable: ENABLE,
51 _reserved18: [u8; 0x04],
52 #[doc = "0x508..0x510 - Unspecified"]
53 pub psel: PSEL,
54 _reserved19: [u8; 0x14],
55 #[doc = "0x524 - TWI frequency. Accuracy depends on the HFCLK source selected."]
56 pub frequency: FREQUENCY,
57 _reserved20: [u8; 0x0c],
58 #[doc = "0x534..0x544 - RXD EasyDMA channel"]
59 pub rxd: RXD,
60 #[doc = "0x544..0x554 - TXD EasyDMA channel"]
61 pub txd: TXD,
62 _reserved22: [u8; 0x34],
63 #[doc = "0x588 - Address used in the TWI transfer"]
64 pub address: ADDRESS,
65}
66#[doc = "TASKS_STARTRX (w) register accessor: an alias for `Reg<TASKS_STARTRX_SPEC>`"]
67pub type TASKS_STARTRX = crate::Reg<tasks_startrx::TASKS_STARTRX_SPEC>;
68#[doc = "Start TWI receive sequence"]
69pub mod tasks_startrx;
70#[doc = "TASKS_STARTTX (w) register accessor: an alias for `Reg<TASKS_STARTTX_SPEC>`"]
71pub type TASKS_STARTTX = crate::Reg<tasks_starttx::TASKS_STARTTX_SPEC>;
72#[doc = "Start TWI transmit sequence"]
73pub mod tasks_starttx;
74#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
75pub type TASKS_STOP = crate::Reg<tasks_stop::TASKS_STOP_SPEC>;
76#[doc = "Stop TWI transaction. Must be issued while the TWI master is not suspended."]
77pub mod tasks_stop;
78#[doc = "TASKS_SUSPEND (w) register accessor: an alias for `Reg<TASKS_SUSPEND_SPEC>`"]
79pub type TASKS_SUSPEND = crate::Reg<tasks_suspend::TASKS_SUSPEND_SPEC>;
80#[doc = "Suspend TWI transaction"]
81pub mod tasks_suspend;
82#[doc = "TASKS_RESUME (w) register accessor: an alias for `Reg<TASKS_RESUME_SPEC>`"]
83pub type TASKS_RESUME = crate::Reg<tasks_resume::TASKS_RESUME_SPEC>;
84#[doc = "Resume TWI transaction"]
85pub mod tasks_resume;
86#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg<EVENTS_STOPPED_SPEC>`"]
87pub type EVENTS_STOPPED = crate::Reg<events_stopped::EVENTS_STOPPED_SPEC>;
88#[doc = "TWI stopped"]
89pub mod events_stopped;
90#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg<EVENTS_ERROR_SPEC>`"]
91pub type EVENTS_ERROR = crate::Reg<events_error::EVENTS_ERROR_SPEC>;
92#[doc = "TWI error"]
93pub mod events_error;
94#[doc = "EVENTS_SUSPENDED (rw) register accessor: an alias for `Reg<EVENTS_SUSPENDED_SPEC>`"]
95pub type EVENTS_SUSPENDED = crate::Reg<events_suspended::EVENTS_SUSPENDED_SPEC>;
96#[doc = "Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended."]
97pub mod events_suspended;
98#[doc = "EVENTS_RXSTARTED (rw) register accessor: an alias for `Reg<EVENTS_RXSTARTED_SPEC>`"]
99pub type EVENTS_RXSTARTED = crate::Reg<events_rxstarted::EVENTS_RXSTARTED_SPEC>;
100#[doc = "Receive sequence started"]
101pub mod events_rxstarted;
102#[doc = "EVENTS_TXSTARTED (rw) register accessor: an alias for `Reg<EVENTS_TXSTARTED_SPEC>`"]
103pub type EVENTS_TXSTARTED = crate::Reg<events_txstarted::EVENTS_TXSTARTED_SPEC>;
104#[doc = "Transmit sequence started"]
105pub mod events_txstarted;
106#[doc = "EVENTS_LASTRX (rw) register accessor: an alias for `Reg<EVENTS_LASTRX_SPEC>`"]
107pub type EVENTS_LASTRX = crate::Reg<events_lastrx::EVENTS_LASTRX_SPEC>;
108#[doc = "Byte boundary, starting to receive the last byte"]
109pub mod events_lastrx;
110#[doc = "EVENTS_LASTTX (rw) register accessor: an alias for `Reg<EVENTS_LASTTX_SPEC>`"]
111pub type EVENTS_LASTTX = crate::Reg<events_lasttx::EVENTS_LASTTX_SPEC>;
112#[doc = "Byte boundary, starting to transmit the last byte"]
113pub mod events_lasttx;
114#[doc = "SHORTS (rw) register accessor: an alias for `Reg<SHORTS_SPEC>`"]
115pub type SHORTS = crate::Reg<shorts::SHORTS_SPEC>;
116#[doc = "Shortcut register"]
117pub mod shorts;
118#[doc = "INTEN (rw) register accessor: an alias for `Reg<INTEN_SPEC>`"]
119pub type INTEN = crate::Reg<inten::INTEN_SPEC>;
120#[doc = "Enable or disable interrupt"]
121pub mod inten;
122#[doc = "INTENSET (rw) register accessor: an alias for `Reg<INTENSET_SPEC>`"]
123pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
124#[doc = "Enable interrupt"]
125pub mod intenset;
126#[doc = "INTENCLR (rw) register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
127pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
128#[doc = "Disable interrupt"]
129pub mod intenclr;
130#[doc = "ERRORSRC (rw) register accessor: an alias for `Reg<ERRORSRC_SPEC>`"]
131pub type ERRORSRC = crate::Reg<errorsrc::ERRORSRC_SPEC>;
132#[doc = "Error source"]
133pub mod errorsrc;
134#[doc = "ENABLE (rw) register accessor: an alias for `Reg<ENABLE_SPEC>`"]
135pub type ENABLE = crate::Reg<enable::ENABLE_SPEC>;
136#[doc = "Enable TWIM"]
137pub mod enable;
138#[doc = "Unspecified"]
139pub use psel::PSEL;
140#[doc = r"Cluster"]
141#[doc = "Unspecified"]
142pub mod psel;
143#[doc = "FREQUENCY (rw) register accessor: an alias for `Reg<FREQUENCY_SPEC>`"]
144pub type FREQUENCY = crate::Reg<frequency::FREQUENCY_SPEC>;
145#[doc = "TWI frequency. Accuracy depends on the HFCLK source selected."]
146pub mod frequency;
147#[doc = "RXD EasyDMA channel"]
148pub use rxd::RXD;
149#[doc = r"Cluster"]
150#[doc = "RXD EasyDMA channel"]
151pub mod rxd;
152#[doc = "TXD EasyDMA channel"]
153pub use txd::TXD;
154#[doc = r"Cluster"]
155#[doc = "TXD EasyDMA channel"]
156pub mod txd;
157#[doc = "ADDRESS (rw) register accessor: an alias for `Reg<ADDRESS_SPEC>`"]
158pub type ADDRESS = crate::Reg<address::ADDRESS_SPEC>;
159#[doc = "Address used in the TWI transfer"]
160pub mod address;