nrf52840_pac/
twi0.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"]
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 #[doc = "0x108 - TWI RXD byte received"]
21 pub events_rxdready: EVENTS_RXDREADY,
22 _reserved7: [u8; 0x10],
23 #[doc = "0x11c - TWI TXD byte sent"]
24 pub events_txdsent: EVENTS_TXDSENT,
25 _reserved8: [u8; 0x04],
26 #[doc = "0x124 - TWI error"]
27 pub events_error: EVENTS_ERROR,
28 _reserved9: [u8; 0x10],
29 #[doc = "0x138 - TWI byte boundary, generated before each byte that is sent or received"]
30 pub events_bb: EVENTS_BB,
31 _reserved10: [u8; 0x0c],
32 #[doc = "0x148 - TWI entered the suspended state"]
33 pub events_suspended: EVENTS_SUSPENDED,
34 _reserved11: [u8; 0xb4],
35 #[doc = "0x200 - Shortcut register"]
36 pub shorts: SHORTS,
37 _reserved12: [u8; 0x0100],
38 #[doc = "0x304 - Enable interrupt"]
39 pub intenset: INTENSET,
40 #[doc = "0x308 - Disable interrupt"]
41 pub intenclr: INTENCLR,
42 _reserved14: [u8; 0x01b8],
43 #[doc = "0x4c4 - Error source"]
44 pub errorsrc: ERRORSRC,
45 _reserved15: [u8; 0x38],
46 #[doc = "0x500 - Enable TWI"]
47 pub enable: ENABLE,
48 _reserved16: [u8; 0x04],
49 #[doc = "0x508..0x510 - Unspecified"]
50 pub psel: PSEL,
51 _reserved17: [u8; 0x08],
52 #[doc = "0x518 - RXD register"]
53 pub rxd: RXD,
54 #[doc = "0x51c - TXD register"]
55 pub txd: TXD,
56 _reserved19: [u8; 0x04],
57 #[doc = "0x524 - TWI frequency. Accuracy depends on the HFCLK source selected."]
58 pub frequency: FREQUENCY,
59 _reserved20: [u8; 0x60],
60 #[doc = "0x588 - Address used in the TWI transfer"]
61 pub address: ADDRESS,
62}
63#[doc = "TASKS_STARTRX (w) register accessor: an alias for `Reg<TASKS_STARTRX_SPEC>`"]
64pub type TASKS_STARTRX = crate::Reg<tasks_startrx::TASKS_STARTRX_SPEC>;
65#[doc = "Start TWI receive sequence"]
66pub mod tasks_startrx;
67#[doc = "TASKS_STARTTX (w) register accessor: an alias for `Reg<TASKS_STARTTX_SPEC>`"]
68pub type TASKS_STARTTX = crate::Reg<tasks_starttx::TASKS_STARTTX_SPEC>;
69#[doc = "Start TWI transmit sequence"]
70pub mod tasks_starttx;
71#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
72pub type TASKS_STOP = crate::Reg<tasks_stop::TASKS_STOP_SPEC>;
73#[doc = "Stop TWI transaction"]
74pub mod tasks_stop;
75#[doc = "TASKS_SUSPEND (w) register accessor: an alias for `Reg<TASKS_SUSPEND_SPEC>`"]
76pub type TASKS_SUSPEND = crate::Reg<tasks_suspend::TASKS_SUSPEND_SPEC>;
77#[doc = "Suspend TWI transaction"]
78pub mod tasks_suspend;
79#[doc = "TASKS_RESUME (w) register accessor: an alias for `Reg<TASKS_RESUME_SPEC>`"]
80pub type TASKS_RESUME = crate::Reg<tasks_resume::TASKS_RESUME_SPEC>;
81#[doc = "Resume TWI transaction"]
82pub mod tasks_resume;
83#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg<EVENTS_STOPPED_SPEC>`"]
84pub type EVENTS_STOPPED = crate::Reg<events_stopped::EVENTS_STOPPED_SPEC>;
85#[doc = "TWI stopped"]
86pub mod events_stopped;
87#[doc = "EVENTS_RXDREADY (rw) register accessor: an alias for `Reg<EVENTS_RXDREADY_SPEC>`"]
88pub type EVENTS_RXDREADY = crate::Reg<events_rxdready::EVENTS_RXDREADY_SPEC>;
89#[doc = "TWI RXD byte received"]
90pub mod events_rxdready;
91#[doc = "EVENTS_TXDSENT (rw) register accessor: an alias for `Reg<EVENTS_TXDSENT_SPEC>`"]
92pub type EVENTS_TXDSENT = crate::Reg<events_txdsent::EVENTS_TXDSENT_SPEC>;
93#[doc = "TWI TXD byte sent"]
94pub mod events_txdsent;
95#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg<EVENTS_ERROR_SPEC>`"]
96pub type EVENTS_ERROR = crate::Reg<events_error::EVENTS_ERROR_SPEC>;
97#[doc = "TWI error"]
98pub mod events_error;
99#[doc = "EVENTS_BB (rw) register accessor: an alias for `Reg<EVENTS_BB_SPEC>`"]
100pub type EVENTS_BB = crate::Reg<events_bb::EVENTS_BB_SPEC>;
101#[doc = "TWI byte boundary, generated before each byte that is sent or received"]
102pub mod events_bb;
103#[doc = "EVENTS_SUSPENDED (rw) register accessor: an alias for `Reg<EVENTS_SUSPENDED_SPEC>`"]
104pub type EVENTS_SUSPENDED = crate::Reg<events_suspended::EVENTS_SUSPENDED_SPEC>;
105#[doc = "TWI entered the suspended state"]
106pub mod events_suspended;
107#[doc = "SHORTS (rw) register accessor: an alias for `Reg<SHORTS_SPEC>`"]
108pub type SHORTS = crate::Reg<shorts::SHORTS_SPEC>;
109#[doc = "Shortcut register"]
110pub mod shorts;
111#[doc = "INTENSET (rw) register accessor: an alias for `Reg<INTENSET_SPEC>`"]
112pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
113#[doc = "Enable interrupt"]
114pub mod intenset;
115#[doc = "INTENCLR (rw) register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
116pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
117#[doc = "Disable interrupt"]
118pub mod intenclr;
119#[doc = "ERRORSRC (rw) register accessor: an alias for `Reg<ERRORSRC_SPEC>`"]
120pub type ERRORSRC = crate::Reg<errorsrc::ERRORSRC_SPEC>;
121#[doc = "Error source"]
122pub mod errorsrc;
123#[doc = "ENABLE (rw) register accessor: an alias for `Reg<ENABLE_SPEC>`"]
124pub type ENABLE = crate::Reg<enable::ENABLE_SPEC>;
125#[doc = "Enable TWI"]
126pub mod enable;
127#[doc = "Unspecified"]
128pub use psel::PSEL;
129#[doc = r"Cluster"]
130#[doc = "Unspecified"]
131pub mod psel;
132#[doc = "RXD (r) register accessor: an alias for `Reg<RXD_SPEC>`"]
133pub type RXD = crate::Reg<rxd::RXD_SPEC>;
134#[doc = "RXD register"]
135pub mod rxd;
136#[doc = "TXD (rw) register accessor: an alias for `Reg<TXD_SPEC>`"]
137pub type TXD = crate::Reg<txd::TXD_SPEC>;
138#[doc = "TXD register"]
139pub mod txd;
140#[doc = "FREQUENCY (rw) register accessor: an alias for `Reg<FREQUENCY_SPEC>`"]
141pub type FREQUENCY = crate::Reg<frequency::FREQUENCY_SPEC>;
142#[doc = "TWI frequency. Accuracy depends on the HFCLK source selected."]
143pub mod frequency;
144#[doc = "ADDRESS (rw) register accessor: an alias for `Reg<ADDRESS_SPEC>`"]
145pub type ADDRESS = crate::Reg<address::ADDRESS_SPEC>;
146#[doc = "Address used in the TWI transfer"]
147pub mod address;