nrf52832_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 - Pin select for SCL"]
50    pub pselscl: PSELSCL,
51    #[doc = "0x50c - Pin select for SDA"]
52    pub pselsda: PSELSDA,
53    _reserved18: [u8; 0x08],
54    #[doc = "0x518 - RXD register"]
55    pub rxd: RXD,
56    #[doc = "0x51c - TXD register"]
57    pub txd: TXD,
58    _reserved20: [u8; 0x04],
59    #[doc = "0x524 - TWI frequency"]
60    pub frequency: FREQUENCY,
61    _reserved21: [u8; 0x60],
62    #[doc = "0x588 - Address used in the TWI transfer"]
63    pub address: ADDRESS,
64}
65#[doc = "TASKS_STARTRX (w) register accessor: an alias for `Reg<TASKS_STARTRX_SPEC>`"]
66pub type TASKS_STARTRX = crate::Reg<tasks_startrx::TASKS_STARTRX_SPEC>;
67#[doc = "Start TWI receive sequence"]
68pub mod tasks_startrx;
69#[doc = "TASKS_STARTTX (w) register accessor: an alias for `Reg<TASKS_STARTTX_SPEC>`"]
70pub type TASKS_STARTTX = crate::Reg<tasks_starttx::TASKS_STARTTX_SPEC>;
71#[doc = "Start TWI transmit sequence"]
72pub mod tasks_starttx;
73#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
74pub type TASKS_STOP = crate::Reg<tasks_stop::TASKS_STOP_SPEC>;
75#[doc = "Stop TWI transaction"]
76pub mod tasks_stop;
77#[doc = "TASKS_SUSPEND (w) register accessor: an alias for `Reg<TASKS_SUSPEND_SPEC>`"]
78pub type TASKS_SUSPEND = crate::Reg<tasks_suspend::TASKS_SUSPEND_SPEC>;
79#[doc = "Suspend TWI transaction"]
80pub mod tasks_suspend;
81#[doc = "TASKS_RESUME (w) register accessor: an alias for `Reg<TASKS_RESUME_SPEC>`"]
82pub type TASKS_RESUME = crate::Reg<tasks_resume::TASKS_RESUME_SPEC>;
83#[doc = "Resume TWI transaction"]
84pub mod tasks_resume;
85#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg<EVENTS_STOPPED_SPEC>`"]
86pub type EVENTS_STOPPED = crate::Reg<events_stopped::EVENTS_STOPPED_SPEC>;
87#[doc = "TWI stopped"]
88pub mod events_stopped;
89#[doc = "EVENTS_RXDREADY (rw) register accessor: an alias for `Reg<EVENTS_RXDREADY_SPEC>`"]
90pub type EVENTS_RXDREADY = crate::Reg<events_rxdready::EVENTS_RXDREADY_SPEC>;
91#[doc = "TWI RXD byte received"]
92pub mod events_rxdready;
93#[doc = "EVENTS_TXDSENT (rw) register accessor: an alias for `Reg<EVENTS_TXDSENT_SPEC>`"]
94pub type EVENTS_TXDSENT = crate::Reg<events_txdsent::EVENTS_TXDSENT_SPEC>;
95#[doc = "TWI TXD byte sent"]
96pub mod events_txdsent;
97#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg<EVENTS_ERROR_SPEC>`"]
98pub type EVENTS_ERROR = crate::Reg<events_error::EVENTS_ERROR_SPEC>;
99#[doc = "TWI error"]
100pub mod events_error;
101#[doc = "EVENTS_BB (rw) register accessor: an alias for `Reg<EVENTS_BB_SPEC>`"]
102pub type EVENTS_BB = crate::Reg<events_bb::EVENTS_BB_SPEC>;
103#[doc = "TWI byte boundary, generated before each byte that is sent or received"]
104pub mod events_bb;
105#[doc = "EVENTS_SUSPENDED (rw) register accessor: an alias for `Reg<EVENTS_SUSPENDED_SPEC>`"]
106pub type EVENTS_SUSPENDED = crate::Reg<events_suspended::EVENTS_SUSPENDED_SPEC>;
107#[doc = "TWI entered the suspended state"]
108pub mod events_suspended;
109#[doc = "SHORTS (rw) register accessor: an alias for `Reg<SHORTS_SPEC>`"]
110pub type SHORTS = crate::Reg<shorts::SHORTS_SPEC>;
111#[doc = "Shortcut register"]
112pub mod shorts;
113#[doc = "INTENSET (rw) register accessor: an alias for `Reg<INTENSET_SPEC>`"]
114pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
115#[doc = "Enable interrupt"]
116pub mod intenset;
117#[doc = "INTENCLR (rw) register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
118pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
119#[doc = "Disable interrupt"]
120pub mod intenclr;
121#[doc = "ERRORSRC (rw) register accessor: an alias for `Reg<ERRORSRC_SPEC>`"]
122pub type ERRORSRC = crate::Reg<errorsrc::ERRORSRC_SPEC>;
123#[doc = "Error source"]
124pub mod errorsrc;
125#[doc = "ENABLE (rw) register accessor: an alias for `Reg<ENABLE_SPEC>`"]
126pub type ENABLE = crate::Reg<enable::ENABLE_SPEC>;
127#[doc = "Enable TWI"]
128pub mod enable;
129#[doc = "PSELSCL (rw) register accessor: an alias for `Reg<PSELSCL_SPEC>`"]
130pub type PSELSCL = crate::Reg<pselscl::PSELSCL_SPEC>;
131#[doc = "Pin select for SCL"]
132pub mod pselscl;
133#[doc = "PSELSDA (rw) register accessor: an alias for `Reg<PSELSDA_SPEC>`"]
134pub type PSELSDA = crate::Reg<pselsda::PSELSDA_SPEC>;
135#[doc = "Pin select for SDA"]
136pub mod pselsda;
137#[doc = "RXD (r) register accessor: an alias for `Reg<RXD_SPEC>`"]
138pub type RXD = crate::Reg<rxd::RXD_SPEC>;
139#[doc = "RXD register"]
140pub mod rxd;
141#[doc = "TXD (rw) register accessor: an alias for `Reg<TXD_SPEC>`"]
142pub type TXD = crate::Reg<txd::TXD_SPEC>;
143#[doc = "TXD register"]
144pub mod txd;
145#[doc = "FREQUENCY (rw) register accessor: an alias for `Reg<FREQUENCY_SPEC>`"]
146pub type FREQUENCY = crate::Reg<frequency::FREQUENCY_SPEC>;
147#[doc = "TWI frequency"]
148pub mod frequency;
149#[doc = "ADDRESS (rw) register accessor: an alias for `Reg<ADDRESS_SPEC>`"]
150pub type ADDRESS = crate::Reg<address::ADDRESS_SPEC>;
151#[doc = "Address used in the TWI transfer"]
152pub mod address;