1#![feature(abi_msp430_interrupt)]
2#![doc = "Peripheral access API for MSP430F249 microcontrollers (generated using svd2rust v0.29.0 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next]
3svd2rust release can be generated by cloning the svd2rust [repository], checking out the above commit, and running `cargo doc --open`.\n\n[here]: https://docs.rs/svd2rust/0.29.0/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"]
4#![deny(dead_code)]
5#![deny(improper_ctypes)]
6#![deny(missing_docs)]
7#![deny(no_mangle_generic_items)]
8#![deny(non_shorthand_field_patterns)]
9#![deny(overflowing_literals)]
10#![deny(path_statements)]
11#![deny(patterns_in_fns_without_body)]
12#![deny(private_in_public)]
13#![deny(unconditional_recursion)]
14#![deny(unused_allocation)]
15#![deny(unused_comparisons)]
16#![deny(unused_parens)]
17#![deny(while_true)]
18#![allow(non_camel_case_types)]
19#![allow(non_snake_case)]
20#![no_std]
21#[cfg(feature = "rt")]
22pub use self::Interrupt as interrupt;
23use core::marker::PhantomData;
24use core::ops::Deref;
25#[allow(unused_imports)]
26use generic::*;
27#[cfg(feature = "rt")]
28pub use msp430_rt::interrupt;
29#[doc = "Common register and bit access and modify traits"]
30pub mod generic;
31#[cfg(feature = "rt")]
32extern "msp430-interrupt" {
33 fn RESERVED0();
34 fn RESERVED1();
35 fn RESERVED2();
36 fn RESERVED3();
37 fn RESERVED4();
38 fn RESERVED5();
39 fn RESERVED6();
40 fn RESERVED7();
41 fn RESERVED8();
42 fn RESERVED9();
43 fn RESERVED10();
44 fn RESERVED11();
45 fn RESERVED12();
46 fn RESERVED13();
47 fn RESERVED14();
48 fn RESERVED15();
49 fn USCIAB1TX();
50 fn USCIAB1RX();
51 fn PORT1();
52 fn PORT2();
53 fn RESERVED20();
54 fn ADC12();
55 fn USCIAB0TX();
56 fn USCIAB0RX();
57 fn TIMERA1();
58 fn TIMERA0();
59 fn WDT();
60 fn COMPARATORA();
61 fn TIMERB1();
62 fn TIMERB0();
63 fn NMI();
64}
65#[doc(hidden)]
66pub union Vector {
67 _handler: unsafe extern "msp430-interrupt" fn(),
68 _reserved: u16,
69}
70#[cfg(feature = "rt")]
71#[doc(hidden)]
72#[link_section = ".vector_table.interrupts"]
73#[no_mangle]
74#[used]
75pub static __INTERRUPTS: [Vector; 31] = [
76 Vector {
77 _handler: RESERVED0,
78 },
79 Vector {
80 _handler: RESERVED1,
81 },
82 Vector {
83 _handler: RESERVED2,
84 },
85 Vector {
86 _handler: RESERVED3,
87 },
88 Vector {
89 _handler: RESERVED4,
90 },
91 Vector {
92 _handler: RESERVED5,
93 },
94 Vector {
95 _handler: RESERVED6,
96 },
97 Vector {
98 _handler: RESERVED7,
99 },
100 Vector {
101 _handler: RESERVED8,
102 },
103 Vector {
104 _handler: RESERVED9,
105 },
106 Vector {
107 _handler: RESERVED10,
108 },
109 Vector {
110 _handler: RESERVED11,
111 },
112 Vector {
113 _handler: RESERVED12,
114 },
115 Vector {
116 _handler: RESERVED13,
117 },
118 Vector {
119 _handler: RESERVED14,
120 },
121 Vector {
122 _handler: RESERVED15,
123 },
124 Vector {
125 _handler: USCIAB1TX,
126 },
127 Vector {
128 _handler: USCIAB1RX,
129 },
130 Vector { _handler: PORT1 },
131 Vector { _handler: PORT2 },
132 Vector {
133 _handler: RESERVED20,
134 },
135 Vector { _handler: ADC12 },
136 Vector {
137 _handler: USCIAB0TX,
138 },
139 Vector {
140 _handler: USCIAB0RX,
141 },
142 Vector { _handler: TIMERA1 },
143 Vector { _handler: TIMERA0 },
144 Vector { _handler: WDT },
145 Vector {
146 _handler: COMPARATORA,
147 },
148 Vector { _handler: TIMERB1 },
149 Vector { _handler: TIMERB0 },
150 Vector { _handler: NMI },
151];
152#[doc = r"Enumeration of all the interrupts. This enum is seldom used in application or library crates. It is present primarily for documenting the device's implemented interrupts."]
153#[derive(Copy, Clone, Debug, PartialEq, Eq)]
154#[repr(u16)]
155pub enum Interrupt {
156 #[doc = "0 - 0xFFC0 Reserved Int. Vector 0"]
157 RESERVED0 = 0,
158 #[doc = "1 - 0xFFC2 Reserved Int. Vector 1"]
159 RESERVED1 = 1,
160 #[doc = "2 - 0xFFC4 Reserved Int. Vector 2"]
161 RESERVED2 = 2,
162 #[doc = "3 - 0xFFC6 Reserved Int. Vector 3"]
163 RESERVED3 = 3,
164 #[doc = "4 - 0xFFC8 Reserved Int. Vector 4"]
165 RESERVED4 = 4,
166 #[doc = "5 - 0xFFCA Reserved Int. Vector 5"]
167 RESERVED5 = 5,
168 #[doc = "6 - 0xFFCC Reserved Int. Vector 6"]
169 RESERVED6 = 6,
170 #[doc = "7 - 0xFFCE Reserved Int. Vector 7"]
171 RESERVED7 = 7,
172 #[doc = "8 - 0xFFD0 Reserved Int. Vector 8"]
173 RESERVED8 = 8,
174 #[doc = "9 - 0xFFD2 Reserved Int. Vector 9"]
175 RESERVED9 = 9,
176 #[doc = "10 - 0xFFD4 Reserved Int. Vector 10"]
177 RESERVED10 = 10,
178 #[doc = "11 - 0xFFD6 Reserved Int. Vector 11"]
179 RESERVED11 = 11,
180 #[doc = "12 - 0xFFD8 Reserved Int. Vector 12"]
181 RESERVED12 = 12,
182 #[doc = "13 - 0xFFDA Reserved Int. Vector 13"]
183 RESERVED13 = 13,
184 #[doc = "14 - 0xFFDC Reserved Int. Vector 14"]
185 RESERVED14 = 14,
186 #[doc = "15 - 0xFFDE Reserved Int. Vector 15"]
187 RESERVED15 = 15,
188 #[doc = "16 - 0xFFE0 USCI A1/B1 Transmit"]
189 USCIAB1TX = 16,
190 #[doc = "17 - 0xFFE2 USCI A1/B1 Receive"]
191 USCIAB1RX = 17,
192 #[doc = "18 - 0xFFE4 Port 1"]
193 PORT1 = 18,
194 #[doc = "19 - 0xFFE6 Port 2"]
195 PORT2 = 19,
196 #[doc = "20 - 0xFFE8 Reserved Int. Vector 20"]
197 RESERVED20 = 20,
198 #[doc = "21 - 0xFFEA ADC"]
199 ADC12 = 21,
200 #[doc = "22 - 0xFFEC USCI A0/B0 Transmit"]
201 USCIAB0TX = 22,
202 #[doc = "23 - 0xFFEE USCI A0/B0 Receive"]
203 USCIAB0RX = 23,
204 #[doc = "24 - 0xFFF0 Timer A CC1-2, TA"]
205 TIMERA1 = 24,
206 #[doc = "25 - 0xFFF2 Timer A CC0"]
207 TIMERA0 = 25,
208 #[doc = "26 - 0xFFF4 Watchdog Timer"]
209 WDT = 26,
210 #[doc = "27 - 0xFFF6 Comparator A"]
211 COMPARATORA = 27,
212 #[doc = "28 - 0xFFF8 Timer B CC1-6, TB"]
213 TIMERB1 = 28,
214 #[doc = "29 - 0xFFFA Timer B CC0"]
215 TIMERB0 = 29,
216 #[doc = "30 - 0xFFFC Non-maskable"]
217 NMI = 30,
218}
219#[doc = "Special Function"]
220pub struct SPECIAL_FUNCTION {
221 _marker: PhantomData<*const ()>,
222}
223unsafe impl Send for SPECIAL_FUNCTION {}
224impl SPECIAL_FUNCTION {
225 #[doc = r"Pointer to the register block"]
226 pub const PTR: *const special_function::RegisterBlock = 0 as *const _;
227 #[doc = r"Return the pointer to the register block"]
228 #[inline(always)]
229 pub const fn ptr() -> *const special_function::RegisterBlock {
230 Self::PTR
231 }
232}
233impl Deref for SPECIAL_FUNCTION {
234 type Target = special_function::RegisterBlock;
235 #[inline(always)]
236 fn deref(&self) -> &Self::Target {
237 unsafe { &*Self::PTR }
238 }
239}
240impl core::fmt::Debug for SPECIAL_FUNCTION {
241 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
242 f.debug_struct("SPECIAL_FUNCTION").finish()
243 }
244}
245#[doc = "Special Function"]
246pub mod special_function;
247#[doc = "Port 3/4"]
248pub struct PORT_3_4 {
249 _marker: PhantomData<*const ()>,
250}
251unsafe impl Send for PORT_3_4 {}
252impl PORT_3_4 {
253 #[doc = r"Pointer to the register block"]
254 pub const PTR: *const port_3_4::RegisterBlock = 0x10 as *const _;
255 #[doc = r"Return the pointer to the register block"]
256 #[inline(always)]
257 pub const fn ptr() -> *const port_3_4::RegisterBlock {
258 Self::PTR
259 }
260}
261impl Deref for PORT_3_4 {
262 type Target = port_3_4::RegisterBlock;
263 #[inline(always)]
264 fn deref(&self) -> &Self::Target {
265 unsafe { &*Self::PTR }
266 }
267}
268impl core::fmt::Debug for PORT_3_4 {
269 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
270 f.debug_struct("PORT_3_4").finish()
271 }
272}
273#[doc = "Port 3/4"]
274pub mod port_3_4;
275#[doc = "Port 5/6"]
276pub struct PORT_5_6 {
277 _marker: PhantomData<*const ()>,
278}
279unsafe impl Send for PORT_5_6 {}
280impl PORT_5_6 {
281 #[doc = r"Pointer to the register block"]
282 pub const PTR: *const port_5_6::RegisterBlock = 0x12 as *const _;
283 #[doc = r"Return the pointer to the register block"]
284 #[inline(always)]
285 pub const fn ptr() -> *const port_5_6::RegisterBlock {
286 Self::PTR
287 }
288}
289impl Deref for PORT_5_6 {
290 type Target = port_5_6::RegisterBlock;
291 #[inline(always)]
292 fn deref(&self) -> &Self::Target {
293 unsafe { &*Self::PTR }
294 }
295}
296impl core::fmt::Debug for PORT_5_6 {
297 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
298 f.debug_struct("PORT_5_6").finish()
299 }
300}
301#[doc = "Port 5/6"]
302pub mod port_5_6;
303#[doc = "Port 1/2"]
304pub struct PORT_1_2 {
305 _marker: PhantomData<*const ()>,
306}
307unsafe impl Send for PORT_1_2 {}
308impl PORT_1_2 {
309 #[doc = r"Pointer to the register block"]
310 pub const PTR: *const port_1_2::RegisterBlock = 0x20 as *const _;
311 #[doc = r"Return the pointer to the register block"]
312 #[inline(always)]
313 pub const fn ptr() -> *const port_1_2::RegisterBlock {
314 Self::PTR
315 }
316}
317impl Deref for PORT_1_2 {
318 type Target = port_1_2::RegisterBlock;
319 #[inline(always)]
320 fn deref(&self) -> &Self::Target {
321 unsafe { &*Self::PTR }
322 }
323}
324impl core::fmt::Debug for PORT_1_2 {
325 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
326 f.debug_struct("PORT_1_2").finish()
327 }
328}
329#[doc = "Port 1/2"]
330pub mod port_1_2;
331#[doc = "System Clock"]
332pub struct SYSTEM_CLOCK {
333 _marker: PhantomData<*const ()>,
334}
335unsafe impl Send for SYSTEM_CLOCK {}
336impl SYSTEM_CLOCK {
337 #[doc = r"Pointer to the register block"]
338 pub const PTR: *const system_clock::RegisterBlock = 0x52 as *const _;
339 #[doc = r"Return the pointer to the register block"]
340 #[inline(always)]
341 pub const fn ptr() -> *const system_clock::RegisterBlock {
342 Self::PTR
343 }
344}
345impl Deref for SYSTEM_CLOCK {
346 type Target = system_clock::RegisterBlock;
347 #[inline(always)]
348 fn deref(&self) -> &Self::Target {
349 unsafe { &*Self::PTR }
350 }
351}
352impl core::fmt::Debug for SYSTEM_CLOCK {
353 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
354 f.debug_struct("SYSTEM_CLOCK").finish()
355 }
356}
357#[doc = "System Clock"]
358pub mod system_clock;
359#[doc = "Supply Voltage Supervisor"]
360pub struct SUPPLY_VOLTAGE_SUPERVISOR {
361 _marker: PhantomData<*const ()>,
362}
363unsafe impl Send for SUPPLY_VOLTAGE_SUPERVISOR {}
364impl SUPPLY_VOLTAGE_SUPERVISOR {
365 #[doc = r"Pointer to the register block"]
366 pub const PTR: *const supply_voltage_supervisor::RegisterBlock = 0x54 as *const _;
367 #[doc = r"Return the pointer to the register block"]
368 #[inline(always)]
369 pub const fn ptr() -> *const supply_voltage_supervisor::RegisterBlock {
370 Self::PTR
371 }
372}
373impl Deref for SUPPLY_VOLTAGE_SUPERVISOR {
374 type Target = supply_voltage_supervisor::RegisterBlock;
375 #[inline(always)]
376 fn deref(&self) -> &Self::Target {
377 unsafe { &*Self::PTR }
378 }
379}
380impl core::fmt::Debug for SUPPLY_VOLTAGE_SUPERVISOR {
381 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
382 f.debug_struct("SUPPLY_VOLTAGE_SUPERVISOR").finish()
383 }
384}
385#[doc = "Supply Voltage Supervisor"]
386pub mod supply_voltage_supervisor;
387#[doc = "Comparator A"]
388pub struct COMPARATOR_A {
389 _marker: PhantomData<*const ()>,
390}
391unsafe impl Send for COMPARATOR_A {}
392impl COMPARATOR_A {
393 #[doc = r"Pointer to the register block"]
394 pub const PTR: *const comparator_a::RegisterBlock = 0x58 as *const _;
395 #[doc = r"Return the pointer to the register block"]
396 #[inline(always)]
397 pub const fn ptr() -> *const comparator_a::RegisterBlock {
398 Self::PTR
399 }
400}
401impl Deref for COMPARATOR_A {
402 type Target = comparator_a::RegisterBlock;
403 #[inline(always)]
404 fn deref(&self) -> &Self::Target {
405 unsafe { &*Self::PTR }
406 }
407}
408impl core::fmt::Debug for COMPARATOR_A {
409 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
410 f.debug_struct("COMPARATOR_A").finish()
411 }
412}
413#[doc = "Comparator A"]
414pub mod comparator_a;
415#[doc = "USCI_A0 UART Mode"]
416pub struct USCI_A0_UART_MODE {
417 _marker: PhantomData<*const ()>,
418}
419unsafe impl Send for USCI_A0_UART_MODE {}
420impl USCI_A0_UART_MODE {
421 #[doc = r"Pointer to the register block"]
422 pub const PTR: *const usci_a0_uart_mode::RegisterBlock = 0x5c as *const _;
423 #[doc = r"Return the pointer to the register block"]
424 #[inline(always)]
425 pub const fn ptr() -> *const usci_a0_uart_mode::RegisterBlock {
426 Self::PTR
427 }
428}
429impl Deref for USCI_A0_UART_MODE {
430 type Target = usci_a0_uart_mode::RegisterBlock;
431 #[inline(always)]
432 fn deref(&self) -> &Self::Target {
433 unsafe { &*Self::PTR }
434 }
435}
436impl core::fmt::Debug for USCI_A0_UART_MODE {
437 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
438 f.debug_struct("USCI_A0_UART_MODE").finish()
439 }
440}
441#[doc = "USCI_A0 UART Mode"]
442pub mod usci_a0_uart_mode;
443#[doc = "USCI_A0 SPI Mode"]
444pub struct USCI_A0_SPI_MODE {
445 _marker: PhantomData<*const ()>,
446}
447unsafe impl Send for USCI_A0_SPI_MODE {}
448impl USCI_A0_SPI_MODE {
449 #[doc = r"Pointer to the register block"]
450 pub const PTR: *const usci_a0_spi_mode::RegisterBlock = 0x60 as *const _;
451 #[doc = r"Return the pointer to the register block"]
452 #[inline(always)]
453 pub const fn ptr() -> *const usci_a0_spi_mode::RegisterBlock {
454 Self::PTR
455 }
456}
457impl Deref for USCI_A0_SPI_MODE {
458 type Target = usci_a0_spi_mode::RegisterBlock;
459 #[inline(always)]
460 fn deref(&self) -> &Self::Target {
461 unsafe { &*Self::PTR }
462 }
463}
464impl core::fmt::Debug for USCI_A0_SPI_MODE {
465 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
466 f.debug_struct("USCI_A0_SPI_MODE").finish()
467 }
468}
469#[doc = "USCI_A0 SPI Mode"]
470pub mod usci_a0_spi_mode;
471#[doc = "USCI_B0 I2C Mode"]
472pub struct USCI_B0_I2C_MODE {
473 _marker: PhantomData<*const ()>,
474}
475unsafe impl Send for USCI_B0_I2C_MODE {}
476impl USCI_B0_I2C_MODE {
477 #[doc = r"Pointer to the register block"]
478 pub const PTR: *const usci_b0_i2c_mode::RegisterBlock = 0x68 as *const _;
479 #[doc = r"Return the pointer to the register block"]
480 #[inline(always)]
481 pub const fn ptr() -> *const usci_b0_i2c_mode::RegisterBlock {
482 Self::PTR
483 }
484}
485impl Deref for USCI_B0_I2C_MODE {
486 type Target = usci_b0_i2c_mode::RegisterBlock;
487 #[inline(always)]
488 fn deref(&self) -> &Self::Target {
489 unsafe { &*Self::PTR }
490 }
491}
492impl core::fmt::Debug for USCI_B0_I2C_MODE {
493 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
494 f.debug_struct("USCI_B0_I2C_MODE").finish()
495 }
496}
497#[doc = "USCI_B0 I2C Mode"]
498pub mod usci_b0_i2c_mode;
499#[doc = "USCI_B0 SPI Mode"]
500pub struct USCI_B0_SPI_MODE {
501 _marker: PhantomData<*const ()>,
502}
503unsafe impl Send for USCI_B0_SPI_MODE {}
504impl USCI_B0_SPI_MODE {
505 #[doc = r"Pointer to the register block"]
506 pub const PTR: *const usci_b0_spi_mode::RegisterBlock = 0x68 as *const _;
507 #[doc = r"Return the pointer to the register block"]
508 #[inline(always)]
509 pub const fn ptr() -> *const usci_b0_spi_mode::RegisterBlock {
510 Self::PTR
511 }
512}
513impl Deref for USCI_B0_SPI_MODE {
514 type Target = usci_b0_spi_mode::RegisterBlock;
515 #[inline(always)]
516 fn deref(&self) -> &Self::Target {
517 unsafe { &*Self::PTR }
518 }
519}
520impl core::fmt::Debug for USCI_B0_SPI_MODE {
521 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
522 f.debug_struct("USCI_B0_SPI_MODE").finish()
523 }
524}
525#[doc = "USCI_B0 SPI Mode"]
526pub mod usci_b0_spi_mode;
527#[doc = "ADC12"]
528pub struct ADC12 {
529 _marker: PhantomData<*const ()>,
530}
531unsafe impl Send for ADC12 {}
532impl ADC12 {
533 #[doc = r"Pointer to the register block"]
534 pub const PTR: *const adc12::RegisterBlock = 0x80 as *const _;
535 #[doc = r"Return the pointer to the register block"]
536 #[inline(always)]
537 pub const fn ptr() -> *const adc12::RegisterBlock {
538 Self::PTR
539 }
540}
541impl Deref for ADC12 {
542 type Target = adc12::RegisterBlock;
543 #[inline(always)]
544 fn deref(&self) -> &Self::Target {
545 unsafe { &*Self::PTR }
546 }
547}
548impl core::fmt::Debug for ADC12 {
549 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
550 f.debug_struct("ADC12").finish()
551 }
552}
553#[doc = "ADC12"]
554pub mod adc12;
555#[doc = "USCI_A1 UART Mode"]
556pub struct USCI_A1_UART_MODE {
557 _marker: PhantomData<*const ()>,
558}
559unsafe impl Send for USCI_A1_UART_MODE {}
560impl USCI_A1_UART_MODE {
561 #[doc = r"Pointer to the register block"]
562 pub const PTR: *const usci_a1_uart_mode::RegisterBlock = 0xcc as *const _;
563 #[doc = r"Return the pointer to the register block"]
564 #[inline(always)]
565 pub const fn ptr() -> *const usci_a1_uart_mode::RegisterBlock {
566 Self::PTR
567 }
568}
569impl Deref for USCI_A1_UART_MODE {
570 type Target = usci_a1_uart_mode::RegisterBlock;
571 #[inline(always)]
572 fn deref(&self) -> &Self::Target {
573 unsafe { &*Self::PTR }
574 }
575}
576impl core::fmt::Debug for USCI_A1_UART_MODE {
577 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
578 f.debug_struct("USCI_A1_UART_MODE").finish()
579 }
580}
581#[doc = "USCI_A1 UART Mode"]
582pub mod usci_a1_uart_mode;
583#[doc = "USCI_A1 SPI Mode"]
584pub struct USCI_A1_SPI_MODE {
585 _marker: PhantomData<*const ()>,
586}
587unsafe impl Send for USCI_A1_SPI_MODE {}
588impl USCI_A1_SPI_MODE {
589 #[doc = r"Pointer to the register block"]
590 pub const PTR: *const usci_a1_spi_mode::RegisterBlock = 0xd0 as *const _;
591 #[doc = r"Return the pointer to the register block"]
592 #[inline(always)]
593 pub const fn ptr() -> *const usci_a1_spi_mode::RegisterBlock {
594 Self::PTR
595 }
596}
597impl Deref for USCI_A1_SPI_MODE {
598 type Target = usci_a1_spi_mode::RegisterBlock;
599 #[inline(always)]
600 fn deref(&self) -> &Self::Target {
601 unsafe { &*Self::PTR }
602 }
603}
604impl core::fmt::Debug for USCI_A1_SPI_MODE {
605 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
606 f.debug_struct("USCI_A1_SPI_MODE").finish()
607 }
608}
609#[doc = "USCI_A1 SPI Mode"]
610pub mod usci_a1_spi_mode;
611#[doc = "USCI_B1 I2C Mode"]
612pub struct USCI_B1_I2C_MODE {
613 _marker: PhantomData<*const ()>,
614}
615unsafe impl Send for USCI_B1_I2C_MODE {}
616impl USCI_B1_I2C_MODE {
617 #[doc = r"Pointer to the register block"]
618 pub const PTR: *const usci_b1_i2c_mode::RegisterBlock = 0xd8 as *const _;
619 #[doc = r"Return the pointer to the register block"]
620 #[inline(always)]
621 pub const fn ptr() -> *const usci_b1_i2c_mode::RegisterBlock {
622 Self::PTR
623 }
624}
625impl Deref for USCI_B1_I2C_MODE {
626 type Target = usci_b1_i2c_mode::RegisterBlock;
627 #[inline(always)]
628 fn deref(&self) -> &Self::Target {
629 unsafe { &*Self::PTR }
630 }
631}
632impl core::fmt::Debug for USCI_B1_I2C_MODE {
633 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
634 f.debug_struct("USCI_B1_I2C_MODE").finish()
635 }
636}
637#[doc = "USCI_B1 I2C Mode"]
638pub mod usci_b1_i2c_mode;
639#[doc = "USCI_B1 SPI Mode"]
640pub struct USCI_B1_SPI_MODE {
641 _marker: PhantomData<*const ()>,
642}
643unsafe impl Send for USCI_B1_SPI_MODE {}
644impl USCI_B1_SPI_MODE {
645 #[doc = r"Pointer to the register block"]
646 pub const PTR: *const usci_b1_spi_mode::RegisterBlock = 0xd8 as *const _;
647 #[doc = r"Return the pointer to the register block"]
648 #[inline(always)]
649 pub const fn ptr() -> *const usci_b1_spi_mode::RegisterBlock {
650 Self::PTR
651 }
652}
653impl Deref for USCI_B1_SPI_MODE {
654 type Target = usci_b1_spi_mode::RegisterBlock;
655 #[inline(always)]
656 fn deref(&self) -> &Self::Target {
657 unsafe { &*Self::PTR }
658 }
659}
660impl core::fmt::Debug for USCI_B1_SPI_MODE {
661 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
662 f.debug_struct("USCI_B1_SPI_MODE").finish()
663 }
664}
665#[doc = "USCI_B1 SPI Mode"]
666pub mod usci_b1_spi_mode;
667#[doc = "TLV Calibration Data"]
668pub struct TLV_CALIBRATION_DATA {
669 _marker: PhantomData<*const ()>,
670}
671unsafe impl Send for TLV_CALIBRATION_DATA {}
672impl TLV_CALIBRATION_DATA {
673 #[doc = r"Pointer to the register block"]
674 pub const PTR: *const tlv_calibration_data::RegisterBlock = 0x10c0 as *const _;
675 #[doc = r"Return the pointer to the register block"]
676 #[inline(always)]
677 pub const fn ptr() -> *const tlv_calibration_data::RegisterBlock {
678 Self::PTR
679 }
680}
681impl Deref for TLV_CALIBRATION_DATA {
682 type Target = tlv_calibration_data::RegisterBlock;
683 #[inline(always)]
684 fn deref(&self) -> &Self::Target {
685 unsafe { &*Self::PTR }
686 }
687}
688impl core::fmt::Debug for TLV_CALIBRATION_DATA {
689 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
690 f.debug_struct("TLV_CALIBRATION_DATA").finish()
691 }
692}
693#[doc = "TLV Calibration Data"]
694pub mod tlv_calibration_data;
695#[doc = "Calibration Data"]
696pub struct CALIBRATION_DATA {
697 _marker: PhantomData<*const ()>,
698}
699unsafe impl Send for CALIBRATION_DATA {}
700impl CALIBRATION_DATA {
701 #[doc = r"Pointer to the register block"]
702 pub const PTR: *const calibration_data::RegisterBlock = 0x10f8 as *const _;
703 #[doc = r"Return the pointer to the register block"]
704 #[inline(always)]
705 pub const fn ptr() -> *const calibration_data::RegisterBlock {
706 Self::PTR
707 }
708}
709impl Deref for CALIBRATION_DATA {
710 type Target = calibration_data::RegisterBlock;
711 #[inline(always)]
712 fn deref(&self) -> &Self::Target {
713 unsafe { &*Self::PTR }
714 }
715}
716impl core::fmt::Debug for CALIBRATION_DATA {
717 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
718 f.debug_struct("CALIBRATION_DATA").finish()
719 }
720}
721#[doc = "Calibration Data"]
722pub mod calibration_data;
723#[doc = "Timer B7"]
724pub struct TIMER_B7 {
725 _marker: PhantomData<*const ()>,
726}
727unsafe impl Send for TIMER_B7 {}
728impl TIMER_B7 {
729 #[doc = r"Pointer to the register block"]
730 pub const PTR: *const timer_b7::RegisterBlock = 0x011e as *const _;
731 #[doc = r"Return the pointer to the register block"]
732 #[inline(always)]
733 pub const fn ptr() -> *const timer_b7::RegisterBlock {
734 Self::PTR
735 }
736}
737impl Deref for TIMER_B7 {
738 type Target = timer_b7::RegisterBlock;
739 #[inline(always)]
740 fn deref(&self) -> &Self::Target {
741 unsafe { &*Self::PTR }
742 }
743}
744impl core::fmt::Debug for TIMER_B7 {
745 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
746 f.debug_struct("TIMER_B7").finish()
747 }
748}
749#[doc = "Timer B7"]
750pub mod timer_b7;
751#[doc = "Watchdog Timer"]
752pub struct WATCHDOG_TIMER {
753 _marker: PhantomData<*const ()>,
754}
755unsafe impl Send for WATCHDOG_TIMER {}
756impl WATCHDOG_TIMER {
757 #[doc = r"Pointer to the register block"]
758 pub const PTR: *const watchdog_timer::RegisterBlock = 0x0120 as *const _;
759 #[doc = r"Return the pointer to the register block"]
760 #[inline(always)]
761 pub const fn ptr() -> *const watchdog_timer::RegisterBlock {
762 Self::PTR
763 }
764}
765impl Deref for WATCHDOG_TIMER {
766 type Target = watchdog_timer::RegisterBlock;
767 #[inline(always)]
768 fn deref(&self) -> &Self::Target {
769 unsafe { &*Self::PTR }
770 }
771}
772impl core::fmt::Debug for WATCHDOG_TIMER {
773 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
774 f.debug_struct("WATCHDOG_TIMER").finish()
775 }
776}
777#[doc = "Watchdog Timer"]
778pub mod watchdog_timer;
779#[doc = "Flash"]
780pub struct FLASH {
781 _marker: PhantomData<*const ()>,
782}
783unsafe impl Send for FLASH {}
784impl FLASH {
785 #[doc = r"Pointer to the register block"]
786 pub const PTR: *const flash::RegisterBlock = 0x0128 as *const _;
787 #[doc = r"Return the pointer to the register block"]
788 #[inline(always)]
789 pub const fn ptr() -> *const flash::RegisterBlock {
790 Self::PTR
791 }
792}
793impl Deref for FLASH {
794 type Target = flash::RegisterBlock;
795 #[inline(always)]
796 fn deref(&self) -> &Self::Target {
797 unsafe { &*Self::PTR }
798 }
799}
800impl core::fmt::Debug for FLASH {
801 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
802 f.debug_struct("FLASH").finish()
803 }
804}
805#[doc = "Flash"]
806pub mod flash;
807#[doc = "Timer A3"]
808pub struct TIMER_A3 {
809 _marker: PhantomData<*const ()>,
810}
811unsafe impl Send for TIMER_A3 {}
812impl TIMER_A3 {
813 #[doc = r"Pointer to the register block"]
814 pub const PTR: *const timer_a3::RegisterBlock = 0x012e as *const _;
815 #[doc = r"Return the pointer to the register block"]
816 #[inline(always)]
817 pub const fn ptr() -> *const timer_a3::RegisterBlock {
818 Self::PTR
819 }
820}
821impl Deref for TIMER_A3 {
822 type Target = timer_a3::RegisterBlock;
823 #[inline(always)]
824 fn deref(&self) -> &Self::Target {
825 unsafe { &*Self::PTR }
826 }
827}
828impl core::fmt::Debug for TIMER_A3 {
829 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
830 f.debug_struct("TIMER_A3").finish()
831 }
832}
833#[doc = "Timer A3"]
834pub mod timer_a3;
835#[doc = "Multiplier"]
836pub struct MULTIPLIER {
837 _marker: PhantomData<*const ()>,
838}
839unsafe impl Send for MULTIPLIER {}
840impl MULTIPLIER {
841 #[doc = r"Pointer to the register block"]
842 pub const PTR: *const multiplier::RegisterBlock = 0x0130 as *const _;
843 #[doc = r"Return the pointer to the register block"]
844 #[inline(always)]
845 pub const fn ptr() -> *const multiplier::RegisterBlock {
846 Self::PTR
847 }
848}
849impl Deref for MULTIPLIER {
850 type Target = multiplier::RegisterBlock;
851 #[inline(always)]
852 fn deref(&self) -> &Self::Target {
853 unsafe { &*Self::PTR }
854 }
855}
856impl core::fmt::Debug for MULTIPLIER {
857 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
858 f.debug_struct("MULTIPLIER").finish()
859 }
860}
861#[doc = "Multiplier"]
862pub mod multiplier;
863#[no_mangle]
864static mut DEVICE_PERIPHERALS: bool = false;
865#[doc = r" All the peripherals."]
866#[allow(non_snake_case)]
867pub struct Peripherals {
868 #[doc = "SPECIAL_FUNCTION"]
869 pub SPECIAL_FUNCTION: SPECIAL_FUNCTION,
870 #[doc = "PORT_3_4"]
871 pub PORT_3_4: PORT_3_4,
872 #[doc = "PORT_5_6"]
873 pub PORT_5_6: PORT_5_6,
874 #[doc = "PORT_1_2"]
875 pub PORT_1_2: PORT_1_2,
876 #[doc = "SYSTEM_CLOCK"]
877 pub SYSTEM_CLOCK: SYSTEM_CLOCK,
878 #[doc = "SUPPLY_VOLTAGE_SUPERVISOR"]
879 pub SUPPLY_VOLTAGE_SUPERVISOR: SUPPLY_VOLTAGE_SUPERVISOR,
880 #[doc = "COMPARATOR_A"]
881 pub COMPARATOR_A: COMPARATOR_A,
882 #[doc = "USCI_A0_UART_MODE"]
883 pub USCI_A0_UART_MODE: USCI_A0_UART_MODE,
884 #[doc = "USCI_A0_SPI_MODE"]
885 pub USCI_A0_SPI_MODE: USCI_A0_SPI_MODE,
886 #[doc = "USCI_B0_I2C_MODE"]
887 pub USCI_B0_I2C_MODE: USCI_B0_I2C_MODE,
888 #[doc = "USCI_B0_SPI_MODE"]
889 pub USCI_B0_SPI_MODE: USCI_B0_SPI_MODE,
890 #[doc = "ADC12"]
891 pub ADC12: ADC12,
892 #[doc = "USCI_A1_UART_MODE"]
893 pub USCI_A1_UART_MODE: USCI_A1_UART_MODE,
894 #[doc = "USCI_A1_SPI_MODE"]
895 pub USCI_A1_SPI_MODE: USCI_A1_SPI_MODE,
896 #[doc = "USCI_B1_I2C_MODE"]
897 pub USCI_B1_I2C_MODE: USCI_B1_I2C_MODE,
898 #[doc = "USCI_B1_SPI_MODE"]
899 pub USCI_B1_SPI_MODE: USCI_B1_SPI_MODE,
900 #[doc = "TLV_CALIBRATION_DATA"]
901 pub TLV_CALIBRATION_DATA: TLV_CALIBRATION_DATA,
902 #[doc = "CALIBRATION_DATA"]
903 pub CALIBRATION_DATA: CALIBRATION_DATA,
904 #[doc = "TIMER_B7"]
905 pub TIMER_B7: TIMER_B7,
906 #[doc = "WATCHDOG_TIMER"]
907 pub WATCHDOG_TIMER: WATCHDOG_TIMER,
908 #[doc = "FLASH"]
909 pub FLASH: FLASH,
910 #[doc = "TIMER_A3"]
911 pub TIMER_A3: TIMER_A3,
912 #[doc = "MULTIPLIER"]
913 pub MULTIPLIER: MULTIPLIER,
914}
915impl Peripherals {
916 #[doc = r" Returns all the peripherals *once*."]
917 #[cfg(feature = "critical-section")]
918 #[inline]
919 pub fn take() -> Option<Self> {
920 critical_section::with(|_| {
921 if unsafe { DEVICE_PERIPHERALS } {
922 return None;
923 }
924 Some(unsafe { Peripherals::steal() })
925 })
926 }
927 #[doc = r" Unchecked version of `Peripherals::take`."]
928 #[doc = r""]
929 #[doc = r" # Safety"]
930 #[doc = r""]
931 #[doc = r" Each of the returned peripherals must be used at most once."]
932 #[inline]
933 pub unsafe fn steal() -> Self {
934 DEVICE_PERIPHERALS = true;
935 Peripherals {
936 SPECIAL_FUNCTION: SPECIAL_FUNCTION {
937 _marker: PhantomData,
938 },
939 PORT_3_4: PORT_3_4 {
940 _marker: PhantomData,
941 },
942 PORT_5_6: PORT_5_6 {
943 _marker: PhantomData,
944 },
945 PORT_1_2: PORT_1_2 {
946 _marker: PhantomData,
947 },
948 SYSTEM_CLOCK: SYSTEM_CLOCK {
949 _marker: PhantomData,
950 },
951 SUPPLY_VOLTAGE_SUPERVISOR: SUPPLY_VOLTAGE_SUPERVISOR {
952 _marker: PhantomData,
953 },
954 COMPARATOR_A: COMPARATOR_A {
955 _marker: PhantomData,
956 },
957 USCI_A0_UART_MODE: USCI_A0_UART_MODE {
958 _marker: PhantomData,
959 },
960 USCI_A0_SPI_MODE: USCI_A0_SPI_MODE {
961 _marker: PhantomData,
962 },
963 USCI_B0_I2C_MODE: USCI_B0_I2C_MODE {
964 _marker: PhantomData,
965 },
966 USCI_B0_SPI_MODE: USCI_B0_SPI_MODE {
967 _marker: PhantomData,
968 },
969 ADC12: ADC12 {
970 _marker: PhantomData,
971 },
972 USCI_A1_UART_MODE: USCI_A1_UART_MODE {
973 _marker: PhantomData,
974 },
975 USCI_A1_SPI_MODE: USCI_A1_SPI_MODE {
976 _marker: PhantomData,
977 },
978 USCI_B1_I2C_MODE: USCI_B1_I2C_MODE {
979 _marker: PhantomData,
980 },
981 USCI_B1_SPI_MODE: USCI_B1_SPI_MODE {
982 _marker: PhantomData,
983 },
984 TLV_CALIBRATION_DATA: TLV_CALIBRATION_DATA {
985 _marker: PhantomData,
986 },
987 CALIBRATION_DATA: CALIBRATION_DATA {
988 _marker: PhantomData,
989 },
990 TIMER_B7: TIMER_B7 {
991 _marker: PhantomData,
992 },
993 WATCHDOG_TIMER: WATCHDOG_TIMER {
994 _marker: PhantomData,
995 },
996 FLASH: FLASH {
997 _marker: PhantomData,
998 },
999 TIMER_A3: TIMER_A3 {
1000 _marker: PhantomData,
1001 },
1002 MULTIPLIER: MULTIPLIER {
1003 _marker: PhantomData,
1004 },
1005 }
1006 }
1007}