#![feature(abi_msp430_interrupt)]
#![doc = "Peripheral access API for MSP430F6736 microcontrollers (generated using svd2rust v0.24.0 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next]
svd2rust 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.24.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"]
#![deny(const_err)]
#![deny(dead_code)]
#![deny(improper_ctypes)]
#![deny(missing_docs)]
#![deny(no_mangle_generic_items)]
#![deny(non_shorthand_field_patterns)]
#![deny(overflowing_literals)]
#![deny(path_statements)]
#![deny(patterns_in_fns_without_body)]
#![deny(private_in_public)]
#![deny(unconditional_recursion)]
#![deny(unused_allocation)]
#![deny(unused_comparisons)]
#![deny(unused_parens)]
#![deny(while_true)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![no_std]
#[cfg(feature = "rt")]
pub use self::Interrupt as interrupt;
use core::marker::PhantomData;
use core::ops::Deref;
#[allow(unused_imports)]
use generic::*;
#[cfg(feature = "rt")]
pub use msp430_rt::interrupt;
#[doc = "Common register and bit access and modify traits"]
pub mod generic;
#[cfg(feature = "rt")]
extern "msp430-interrupt" {
fn RTC();
fn LCD_C();
fn TIMER3_A1();
fn TIMER3_A0();
fn PORT2();
fn TIMER2_A1();
fn TIMER2_A0();
fn PORT1();
fn TIMER1_A1();
fn TIMER1_A0();
fn DMA();
fn AUX();
fn USCI_A2();
fn USCI_A1();
fn TIMER0_A1();
fn TIMER0_A0();
fn SD24B();
fn ADC10();
fn USCI_B0();
fn USCI_A0();
fn WDT();
fn UNMI();
fn SYSNMI();
}
#[doc(hidden)]
pub union Vector {
_handler: unsafe extern "msp430-interrupt" fn(),
_reserved: u16,
}
#[cfg(feature = "rt")]
#[doc(hidden)]
#[link_section = ".vector_table.interrupts"]
#[no_mangle]
#[used]
pub static __INTERRUPTS: [Vector; 63] = [
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _handler: RTC },
Vector { _handler: LCD_C },
Vector {
_handler: TIMER3_A1,
},
Vector {
_handler: TIMER3_A0,
},
Vector { _handler: PORT2 },
Vector {
_handler: TIMER2_A1,
},
Vector {
_handler: TIMER2_A0,
},
Vector { _handler: PORT1 },
Vector {
_handler: TIMER1_A1,
},
Vector {
_handler: TIMER1_A0,
},
Vector { _handler: DMA },
Vector { _handler: AUX },
Vector { _handler: USCI_A2 },
Vector { _handler: USCI_A1 },
Vector {
_handler: TIMER0_A1,
},
Vector {
_handler: TIMER0_A0,
},
Vector { _handler: SD24B },
Vector { _handler: ADC10 },
Vector { _handler: USCI_B0 },
Vector { _handler: USCI_A0 },
Vector { _handler: WDT },
Vector { _handler: UNMI },
Vector { _handler: SYSNMI },
];
#[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."]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[repr(u16)]
pub enum Interrupt {
#[doc = "40 - 0xFFD0 RTC"]
RTC = 40,
#[doc = "41 - 0xFFD2 LCD C"]
LCD_C = 41,
#[doc = "42 - 0xFFD4 Timer3_A2 CC1, TA"]
TIMER3_A1 = 42,
#[doc = "43 - 0xFFD8 Timer3_A2 CC0"]
TIMER3_A0 = 43,
#[doc = "44 - 0xFFDA Port 2"]
PORT2 = 44,
#[doc = "45 - 0xFFDC Timer2_A2 CC1, TA"]
TIMER2_A1 = 45,
#[doc = "46 - 0xFFDE Timer2_A2 CC0"]
TIMER2_A0 = 46,
#[doc = "47 - 0xFFDE Port 1"]
PORT1 = 47,
#[doc = "48 - 0xFFE0 Timer1_A2 CC1, TA1"]
TIMER1_A1 = 48,
#[doc = "49 - 0xFFE2 Timer1_A2 CC0"]
TIMER1_A0 = 49,
#[doc = "50 - 0xFFE4 DMA"]
DMA = 50,
#[doc = "51 - 0xFFE6 AUX Supply"]
AUX = 51,
#[doc = "52 - 0xFFE8 USCI A2 Receive/Transmit"]
USCI_A2 = 52,
#[doc = "53 - 0xFFEA USCI A1 Receive/Transmit"]
USCI_A1 = 53,
#[doc = "54 - 0xFFEC Timer0_A2 CC1-CC2, TA"]
TIMER0_A1 = 54,
#[doc = "55 - 0xFFEE Timer0_A2 CC0"]
TIMER0_A0 = 55,
#[doc = "56 - 0xFFF0 SD24B ADC"]
SD24B = 56,
#[doc = "57 - 0xFFF2 ADC"]
ADC10 = 57,
#[doc = "58 - 0xFFF4 USCI B0 Receive/Transmit"]
USCI_B0 = 58,
#[doc = "59 - 0xFFF6 USCI A0 Receive/Transmit"]
USCI_A0 = 59,
#[doc = "60 - 0xFFF8 Watchdog Timer"]
WDT = 60,
#[doc = "61 - 0xFFFA User Non-maskable"]
UNMI = 61,
#[doc = "62 - 0xFFFC System Non-maskable"]
SYSNMI = 62,
}
#[doc = "Port Mapping Port 1"]
pub struct PORT_MAPPING_PORT_1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT_MAPPING_PORT_1 {}
impl PORT_MAPPING_PORT_1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port_mapping_port_1::RegisterBlock = 0x01c8 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port_mapping_port_1::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT_MAPPING_PORT_1 {
type Target = port_mapping_port_1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT_MAPPING_PORT_1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT_MAPPING_PORT_1").finish()
}
}
#[doc = "Port Mapping Port 1"]
pub mod port_mapping_port_1;
#[doc = "Port Mapping Port 2"]
pub struct PORT_MAPPING_PORT_2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT_MAPPING_PORT_2 {}
impl PORT_MAPPING_PORT_2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port_mapping_port_2::RegisterBlock = 0x01d0 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port_mapping_port_2::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT_MAPPING_PORT_2 {
type Target = port_mapping_port_2::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT_MAPPING_PORT_2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT_MAPPING_PORT_2").finish()
}
}
#[doc = "Port Mapping Port 2"]
pub mod port_mapping_port_2;
#[doc = "Port Mapping Port 3"]
pub struct PORT_MAPPING_PORT_3 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT_MAPPING_PORT_3 {}
impl PORT_MAPPING_PORT_3 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port_mapping_port_3::RegisterBlock = 0x01d8 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port_mapping_port_3::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT_MAPPING_PORT_3 {
type Target = port_mapping_port_3::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT_MAPPING_PORT_3 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT_MAPPING_PORT_3").finish()
}
}
#[doc = "Port Mapping Port 3"]
pub mod port_mapping_port_3;
#[doc = "Port 1/2"]
pub struct PORT_1_2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT_1_2 {}
impl PORT_1_2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port_1_2::RegisterBlock = 0x0200 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port_1_2::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT_1_2 {
type Target = port_1_2::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT_1_2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT_1_2").finish()
}
}
#[doc = "Port 1/2"]
pub mod port_1_2;
#[doc = "Port 3/4"]
pub struct PORT_3_4 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT_3_4 {}
impl PORT_3_4 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port_3_4::RegisterBlock = 0x0220 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port_3_4::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT_3_4 {
type Target = port_3_4::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT_3_4 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT_3_4").finish()
}
}
#[doc = "Port 3/4"]
pub mod port_3_4;
#[doc = "Port 5/6"]
pub struct PORT_5_6 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT_5_6 {}
impl PORT_5_6 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port_5_6::RegisterBlock = 0x0240 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port_5_6::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT_5_6 {
type Target = port_5_6::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT_5_6 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT_5_6").finish()
}
}
#[doc = "Port 5/6"]
pub mod port_5_6;
#[doc = "Port 7/8"]
pub struct PORT_7_8 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT_7_8 {}
impl PORT_7_8 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port_7_8::RegisterBlock = 0x0260 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port_7_8::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT_7_8 {
type Target = port_7_8::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT_7_8 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT_7_8").finish()
}
}
#[doc = "Port 7/8"]
pub mod port_7_8;
#[doc = "Port 9"]
pub struct PORT_9 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT_9 {}
impl PORT_9 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port_9::RegisterBlock = 0x0280 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port_9::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT_9 {
type Target = port_9::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT_9 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT_9").finish()
}
}
#[doc = "Port 9"]
pub mod port_9;
#[doc = "RTC_C Real Time Clock"]
pub struct RTC_C_REAL_TIME_CLOCK {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for RTC_C_REAL_TIME_CLOCK {}
impl RTC_C_REAL_TIME_CLOCK {
#[doc = r"Pointer to the register block"]
pub const PTR: *const rtc_c_real_time_clock::RegisterBlock = 0x04a0 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const rtc_c_real_time_clock::RegisterBlock {
Self::PTR
}
}
impl Deref for RTC_C_REAL_TIME_CLOCK {
type Target = rtc_c_real_time_clock::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for RTC_C_REAL_TIME_CLOCK {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("RTC_C_REAL_TIME_CLOCK").finish()
}
}
#[doc = "RTC_C Real Time Clock"]
pub mod rtc_c_real_time_clock;
#[doc = "USCI_A0 UART Mode"]
pub struct USCI_A0_UART_MODE {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for USCI_A0_UART_MODE {}
impl USCI_A0_UART_MODE {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usci_a0_uart_mode::RegisterBlock = 0x05c0 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usci_a0_uart_mode::RegisterBlock {
Self::PTR
}
}
impl Deref for USCI_A0_UART_MODE {
type Target = usci_a0_uart_mode::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for USCI_A0_UART_MODE {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("USCI_A0_UART_MODE").finish()
}
}
#[doc = "USCI_A0 UART Mode"]
pub mod usci_a0_uart_mode;
#[doc = "USCI_A0 SPI Mode"]
pub struct USCI_A0_SPI_MODE {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for USCI_A0_SPI_MODE {}
impl USCI_A0_SPI_MODE {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usci_a0_spi_mode::RegisterBlock = 0x05c0 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usci_a0_spi_mode::RegisterBlock {
Self::PTR
}
}
impl Deref for USCI_A0_SPI_MODE {
type Target = usci_a0_spi_mode::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for USCI_A0_SPI_MODE {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("USCI_A0_SPI_MODE").finish()
}
}
#[doc = "USCI_A0 SPI Mode"]
pub mod usci_a0_spi_mode;
#[doc = "USCI_A1 UART Mode"]
pub struct USCI_A1_UART_MODE {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for USCI_A1_UART_MODE {}
impl USCI_A1_UART_MODE {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usci_a1_uart_mode::RegisterBlock = 0x05e0 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usci_a1_uart_mode::RegisterBlock {
Self::PTR
}
}
impl Deref for USCI_A1_UART_MODE {
type Target = usci_a1_uart_mode::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for USCI_A1_UART_MODE {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("USCI_A1_UART_MODE").finish()
}
}
#[doc = "USCI_A1 UART Mode"]
pub mod usci_a1_uart_mode;
#[doc = "USCI_A1 SPI Mode"]
pub struct USCI_A1_SPI_MODE {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for USCI_A1_SPI_MODE {}
impl USCI_A1_SPI_MODE {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usci_a1_spi_mode::RegisterBlock = 0x05e0 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usci_a1_spi_mode::RegisterBlock {
Self::PTR
}
}
impl Deref for USCI_A1_SPI_MODE {
type Target = usci_a1_spi_mode::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for USCI_A1_SPI_MODE {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("USCI_A1_SPI_MODE").finish()
}
}
#[doc = "USCI_A1 SPI Mode"]
pub mod usci_a1_spi_mode;
#[doc = "USCI_A2 UART Mode"]
pub struct USCI_A2_UART_MODE {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for USCI_A2_UART_MODE {}
impl USCI_A2_UART_MODE {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usci_a2_uart_mode::RegisterBlock = 0x0600 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usci_a2_uart_mode::RegisterBlock {
Self::PTR
}
}
impl Deref for USCI_A2_UART_MODE {
type Target = usci_a2_uart_mode::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for USCI_A2_UART_MODE {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("USCI_A2_UART_MODE").finish()
}
}
#[doc = "USCI_A2 UART Mode"]
pub mod usci_a2_uart_mode;
#[doc = "USCI_A2 SPI Mode"]
pub struct USCI_A2_SPI_MODE {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for USCI_A2_SPI_MODE {}
impl USCI_A2_SPI_MODE {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usci_a2_spi_mode::RegisterBlock = 0x0600 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usci_a2_spi_mode::RegisterBlock {
Self::PTR
}
}
impl Deref for USCI_A2_SPI_MODE {
type Target = usci_a2_spi_mode::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for USCI_A2_SPI_MODE {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("USCI_A2_SPI_MODE").finish()
}
}
#[doc = "USCI_A2 SPI Mode"]
pub mod usci_a2_spi_mode;
#[doc = "USCI_B0 I2C Mode"]
pub struct USCI_B0_I2C_MODE {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for USCI_B0_I2C_MODE {}
impl USCI_B0_I2C_MODE {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usci_b0_i2c_mode::RegisterBlock = 0x0640 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usci_b0_i2c_mode::RegisterBlock {
Self::PTR
}
}
impl Deref for USCI_B0_I2C_MODE {
type Target = usci_b0_i2c_mode::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for USCI_B0_I2C_MODE {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("USCI_B0_I2C_MODE").finish()
}
}
#[doc = "USCI_B0 I2C Mode"]
pub mod usci_b0_i2c_mode;
#[doc = "USCI_B0 SPI Mode"]
pub struct USCI_B0_SPI_MODE {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for USCI_B0_SPI_MODE {}
impl USCI_B0_SPI_MODE {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usci_b0_spi_mode::RegisterBlock = 0x0640 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usci_b0_spi_mode::RegisterBlock {
Self::PTR
}
}
impl Deref for USCI_B0_SPI_MODE {
type Target = usci_b0_spi_mode::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for USCI_B0_SPI_MODE {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("USCI_B0_SPI_MODE").finish()
}
}
#[doc = "USCI_B0 SPI Mode"]
pub mod usci_b0_spi_mode;
#[doc = "LCD_C"]
pub struct LCD_C {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for LCD_C {}
impl LCD_C {
#[doc = r"Pointer to the register block"]
pub const PTR: *const lcd_c::RegisterBlock = 0x0a00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const lcd_c::RegisterBlock {
Self::PTR
}
}
impl Deref for LCD_C {
type Target = lcd_c::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for LCD_C {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("LCD_C").finish()
}
}
#[doc = "LCD_C"]
pub mod lcd_c;
#[doc = "SFR Special Function Registers"]
pub struct SFR {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for SFR {}
impl SFR {
#[doc = r"Pointer to the register block"]
pub const PTR: *const sfr::RegisterBlock = 0x0100 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const sfr::RegisterBlock {
Self::PTR
}
}
impl Deref for SFR {
type Target = sfr::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for SFR {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SFR").finish()
}
}
#[doc = "SFR Special Function Registers"]
pub mod sfr;
#[doc = "PMM Power Management System"]
pub struct PMM {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PMM {}
impl PMM {
#[doc = r"Pointer to the register block"]
pub const PTR: *const pmm::RegisterBlock = 0x0120 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const pmm::RegisterBlock {
Self::PTR
}
}
impl Deref for PMM {
type Target = pmm::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PMM {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PMM").finish()
}
}
#[doc = "PMM Power Management System"]
pub mod pmm;
#[doc = "Flash"]
pub struct FLASH {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for FLASH {}
impl FLASH {
#[doc = r"Pointer to the register block"]
pub const PTR: *const flash::RegisterBlock = 0x0140 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const flash::RegisterBlock {
Self::PTR
}
}
impl Deref for FLASH {
type Target = flash::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for FLASH {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("FLASH").finish()
}
}
#[doc = "Flash"]
pub mod flash;
#[doc = "CRC16"]
pub struct CRC16 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for CRC16 {}
impl CRC16 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const crc16::RegisterBlock = 0x0150 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const crc16::RegisterBlock {
Self::PTR
}
}
impl Deref for CRC16 {
type Target = crc16::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for CRC16 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CRC16").finish()
}
}
#[doc = "CRC16"]
pub mod crc16;
#[doc = "RC RAM Control Module"]
pub struct RC {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for RC {}
impl RC {
#[doc = r"Pointer to the register block"]
pub const PTR: *const rc::RegisterBlock = 0x0158 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const rc::RegisterBlock {
Self::PTR
}
}
impl Deref for RC {
type Target = rc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for RC {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("RC").finish()
}
}
#[doc = "RC RAM Control Module"]
pub mod rc;
#[doc = "Watchdog Timer"]
pub struct WATCHDOG_TIMER {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for WATCHDOG_TIMER {}
impl WATCHDOG_TIMER {
#[doc = r"Pointer to the register block"]
pub const PTR: *const watchdog_timer::RegisterBlock = 0x015c as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const watchdog_timer::RegisterBlock {
Self::PTR
}
}
impl Deref for WATCHDOG_TIMER {
type Target = watchdog_timer::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for WATCHDOG_TIMER {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("WATCHDOG_TIMER").finish()
}
}
#[doc = "Watchdog Timer"]
pub mod watchdog_timer;
#[doc = "UCS Unified System Clock"]
pub struct UCS {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for UCS {}
impl UCS {
#[doc = r"Pointer to the register block"]
pub const PTR: *const ucs::RegisterBlock = 0x0160 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const ucs::RegisterBlock {
Self::PTR
}
}
impl Deref for UCS {
type Target = ucs::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for UCS {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("UCS").finish()
}
}
#[doc = "UCS Unified System Clock"]
pub mod ucs;
#[doc = "SYS System Module"]
pub struct SYS {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for SYS {}
impl SYS {
#[doc = r"Pointer to the register block"]
pub const PTR: *const sys::RegisterBlock = 0x0180 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const sys::RegisterBlock {
Self::PTR
}
}
impl Deref for SYS {
type Target = sys::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for SYS {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SYS").finish()
}
}
#[doc = "SYS System Module"]
pub mod sys;
#[doc = "Shared Reference"]
pub struct SHARED_REFERENCE {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for SHARED_REFERENCE {}
impl SHARED_REFERENCE {
#[doc = r"Pointer to the register block"]
pub const PTR: *const shared_reference::RegisterBlock = 0x01b0 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const shared_reference::RegisterBlock {
Self::PTR
}
}
impl Deref for SHARED_REFERENCE {
type Target = shared_reference::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for SHARED_REFERENCE {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SHARED_REFERENCE").finish()
}
}
#[doc = "Shared Reference"]
pub mod shared_reference;
#[doc = "Port Mapping Control"]
pub struct PORT_MAPPING_CONTROL {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT_MAPPING_CONTROL {}
impl PORT_MAPPING_CONTROL {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port_mapping_control::RegisterBlock = 0x01c0 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port_mapping_control::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT_MAPPING_CONTROL {
type Target = port_mapping_control::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT_MAPPING_CONTROL {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT_MAPPING_CONTROL").finish()
}
}
#[doc = "Port Mapping Control"]
pub mod port_mapping_control;
#[doc = "Port J"]
pub struct PORT_J {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT_J {}
impl PORT_J {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port_j::RegisterBlock = 0x0320 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port_j::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT_J {
type Target = port_j::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT_J {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT_J").finish()
}
}
#[doc = "Port J"]
pub mod port_j;
#[doc = "Timer0_A3"]
pub struct TIMER_0_A3 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for TIMER_0_A3 {}
impl TIMER_0_A3 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer_0_a3::RegisterBlock = 0x0340 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer_0_a3::RegisterBlock {
Self::PTR
}
}
impl Deref for TIMER_0_A3 {
type Target = timer_0_a3::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for TIMER_0_A3 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("TIMER_0_A3").finish()
}
}
#[doc = "Timer0_A3"]
pub mod timer_0_a3;
#[doc = "Timer1_A2"]
pub struct TIMER_1_A2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for TIMER_1_A2 {}
impl TIMER_1_A2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer_1_a2::RegisterBlock = 0x0380 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer_1_a2::RegisterBlock {
Self::PTR
}
}
impl Deref for TIMER_1_A2 {
type Target = timer_1_a2::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for TIMER_1_A2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("TIMER_1_A2").finish()
}
}
#[doc = "Timer1_A2"]
pub mod timer_1_a2;
#[doc = "Timer2_A2"]
pub struct TIMER_2_A2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for TIMER_2_A2 {}
impl TIMER_2_A2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer_2_a2::RegisterBlock = 0x0400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer_2_a2::RegisterBlock {
Self::PTR
}
}
impl Deref for TIMER_2_A2 {
type Target = timer_2_a2::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for TIMER_2_A2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("TIMER_2_A2").finish()
}
}
#[doc = "Timer2_A2"]
pub mod timer_2_a2;
#[doc = "Timer3_A2"]
pub struct TIMER_3_A2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for TIMER_3_A2 {}
impl TIMER_3_A2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer_3_a2::RegisterBlock = 0x0440 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer_3_a2::RegisterBlock {
Self::PTR
}
}
impl Deref for TIMER_3_A2 {
type Target = timer_3_a2::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for TIMER_3_A2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("TIMER_3_A2").finish()
}
}
#[doc = "Timer3_A2"]
pub mod timer_3_a2;
#[doc = "Backup RAM"]
pub struct BACKUP_RAM {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for BACKUP_RAM {}
impl BACKUP_RAM {
#[doc = r"Pointer to the register block"]
pub const PTR: *const backup_ram::RegisterBlock = 0x0480 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const backup_ram::RegisterBlock {
Self::PTR
}
}
impl Deref for BACKUP_RAM {
type Target = backup_ram::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for BACKUP_RAM {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("BACKUP_RAM").finish()
}
}
#[doc = "Backup RAM"]
pub mod backup_ram;
#[doc = "MPY 16 Multiplier 16 Bit Mode"]
pub struct MPY_16 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for MPY_16 {}
impl MPY_16 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const mpy_16::RegisterBlock = 0x04c0 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const mpy_16::RegisterBlock {
Self::PTR
}
}
impl Deref for MPY_16 {
type Target = mpy_16::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for MPY_16 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MPY_16").finish()
}
}
#[doc = "MPY 16 Multiplier 16 Bit Mode"]
pub mod mpy_16;
#[doc = "MPY 32 Multiplier 32 Bit Mode"]
pub struct MPY_32 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for MPY_32 {}
impl MPY_32 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const mpy_32::RegisterBlock = 0x04d0 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const mpy_32::RegisterBlock {
Self::PTR
}
}
impl Deref for MPY_32 {
type Target = mpy_32::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for MPY_32 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MPY_32").finish()
}
}
#[doc = "MPY 32 Multiplier 32 Bit Mode"]
pub mod mpy_32;
#[doc = "DMA"]
pub struct DMA {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for DMA {}
impl DMA {
#[doc = r"Pointer to the register block"]
pub const PTR: *const dma::RegisterBlock = 0x0500 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const dma::RegisterBlock {
Self::PTR
}
}
impl Deref for DMA {
type Target = dma::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for DMA {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DMA").finish()
}
}
#[doc = "DMA"]
pub mod dma;
#[doc = "ADC10_A"]
pub struct ADC10_A {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for ADC10_A {}
impl ADC10_A {
#[doc = r"Pointer to the register block"]
pub const PTR: *const adc10_a::RegisterBlock = 0x0740 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const adc10_a::RegisterBlock {
Self::PTR
}
}
impl Deref for ADC10_A {
type Target = adc10_a::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for ADC10_A {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ADC10_A").finish()
}
}
#[doc = "ADC10_A"]
pub mod adc10_a;
#[doc = "SD24_B3"]
pub struct SD24_B3 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for SD24_B3 {}
impl SD24_B3 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const sd24_b3::RegisterBlock = 0x0800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const sd24_b3::RegisterBlock {
Self::PTR
}
}
impl Deref for SD24_B3 {
type Target = sd24_b3::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for SD24_B3 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SD24_B3").finish()
}
}
#[doc = "SD24_B3"]
pub mod sd24_b3;
#[doc = "Auxilary Supply"]
pub struct AUXILARY_SUPPLY {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for AUXILARY_SUPPLY {}
impl AUXILARY_SUPPLY {
#[doc = r"Pointer to the register block"]
pub const PTR: *const auxilary_supply::RegisterBlock = 0x09e0 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const auxilary_supply::RegisterBlock {
Self::PTR
}
}
impl Deref for AUXILARY_SUPPLY {
type Target = auxilary_supply::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for AUXILARY_SUPPLY {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AUXILARY_SUPPLY").finish()
}
}
#[doc = "Auxilary Supply"]
pub mod auxilary_supply;
#[no_mangle]
static mut DEVICE_PERIPHERALS: bool = false;
#[doc = r"All the peripherals"]
#[allow(non_snake_case)]
pub struct Peripherals {
#[doc = "PORT_MAPPING_PORT_1"]
pub PORT_MAPPING_PORT_1: PORT_MAPPING_PORT_1,
#[doc = "PORT_MAPPING_PORT_2"]
pub PORT_MAPPING_PORT_2: PORT_MAPPING_PORT_2,
#[doc = "PORT_MAPPING_PORT_3"]
pub PORT_MAPPING_PORT_3: PORT_MAPPING_PORT_3,
#[doc = "PORT_1_2"]
pub PORT_1_2: PORT_1_2,
#[doc = "PORT_3_4"]
pub PORT_3_4: PORT_3_4,
#[doc = "PORT_5_6"]
pub PORT_5_6: PORT_5_6,
#[doc = "PORT_7_8"]
pub PORT_7_8: PORT_7_8,
#[doc = "PORT_9"]
pub PORT_9: PORT_9,
#[doc = "RTC_C_REAL_TIME_CLOCK"]
pub RTC_C_REAL_TIME_CLOCK: RTC_C_REAL_TIME_CLOCK,
#[doc = "USCI_A0_UART_MODE"]
pub USCI_A0_UART_MODE: USCI_A0_UART_MODE,
#[doc = "USCI_A0_SPI_MODE"]
pub USCI_A0_SPI_MODE: USCI_A0_SPI_MODE,
#[doc = "USCI_A1_UART_MODE"]
pub USCI_A1_UART_MODE: USCI_A1_UART_MODE,
#[doc = "USCI_A1_SPI_MODE"]
pub USCI_A1_SPI_MODE: USCI_A1_SPI_MODE,
#[doc = "USCI_A2_UART_MODE"]
pub USCI_A2_UART_MODE: USCI_A2_UART_MODE,
#[doc = "USCI_A2_SPI_MODE"]
pub USCI_A2_SPI_MODE: USCI_A2_SPI_MODE,
#[doc = "USCI_B0_I2C_MODE"]
pub USCI_B0_I2C_MODE: USCI_B0_I2C_MODE,
#[doc = "USCI_B0_SPI_MODE"]
pub USCI_B0_SPI_MODE: USCI_B0_SPI_MODE,
#[doc = "LCD_C"]
pub LCD_C: LCD_C,
#[doc = "SFR"]
pub SFR: SFR,
#[doc = "PMM"]
pub PMM: PMM,
#[doc = "FLASH"]
pub FLASH: FLASH,
#[doc = "CRC16"]
pub CRC16: CRC16,
#[doc = "RC"]
pub RC: RC,
#[doc = "WATCHDOG_TIMER"]
pub WATCHDOG_TIMER: WATCHDOG_TIMER,
#[doc = "UCS"]
pub UCS: UCS,
#[doc = "SYS"]
pub SYS: SYS,
#[doc = "SHARED_REFERENCE"]
pub SHARED_REFERENCE: SHARED_REFERENCE,
#[doc = "PORT_MAPPING_CONTROL"]
pub PORT_MAPPING_CONTROL: PORT_MAPPING_CONTROL,
#[doc = "PORT_J"]
pub PORT_J: PORT_J,
#[doc = "TIMER_0_A3"]
pub TIMER_0_A3: TIMER_0_A3,
#[doc = "TIMER_1_A2"]
pub TIMER_1_A2: TIMER_1_A2,
#[doc = "TIMER_2_A2"]
pub TIMER_2_A2: TIMER_2_A2,
#[doc = "TIMER_3_A2"]
pub TIMER_3_A2: TIMER_3_A2,
#[doc = "BACKUP_RAM"]
pub BACKUP_RAM: BACKUP_RAM,
#[doc = "MPY_16"]
pub MPY_16: MPY_16,
#[doc = "MPY_32"]
pub MPY_32: MPY_32,
#[doc = "DMA"]
pub DMA: DMA,
#[doc = "ADC10_A"]
pub ADC10_A: ADC10_A,
#[doc = "SD24_B3"]
pub SD24_B3: SD24_B3,
#[doc = "AUXILARY_SUPPLY"]
pub AUXILARY_SUPPLY: AUXILARY_SUPPLY,
}
impl Peripherals {
#[doc = r"Returns all the peripherals *once*"]
#[inline]
pub fn take() -> Option<Self> {
msp430::interrupt::free(|_| {
if unsafe { DEVICE_PERIPHERALS } {
None
} else {
Some(unsafe { Peripherals::steal() })
}
})
}
#[doc = r"Unchecked version of `Peripherals::take`"]
#[inline]
pub unsafe fn steal() -> Self {
DEVICE_PERIPHERALS = true;
Peripherals {
PORT_MAPPING_PORT_1: PORT_MAPPING_PORT_1 {
_marker: PhantomData,
},
PORT_MAPPING_PORT_2: PORT_MAPPING_PORT_2 {
_marker: PhantomData,
},
PORT_MAPPING_PORT_3: PORT_MAPPING_PORT_3 {
_marker: PhantomData,
},
PORT_1_2: PORT_1_2 {
_marker: PhantomData,
},
PORT_3_4: PORT_3_4 {
_marker: PhantomData,
},
PORT_5_6: PORT_5_6 {
_marker: PhantomData,
},
PORT_7_8: PORT_7_8 {
_marker: PhantomData,
},
PORT_9: PORT_9 {
_marker: PhantomData,
},
RTC_C_REAL_TIME_CLOCK: RTC_C_REAL_TIME_CLOCK {
_marker: PhantomData,
},
USCI_A0_UART_MODE: USCI_A0_UART_MODE {
_marker: PhantomData,
},
USCI_A0_SPI_MODE: USCI_A0_SPI_MODE {
_marker: PhantomData,
},
USCI_A1_UART_MODE: USCI_A1_UART_MODE {
_marker: PhantomData,
},
USCI_A1_SPI_MODE: USCI_A1_SPI_MODE {
_marker: PhantomData,
},
USCI_A2_UART_MODE: USCI_A2_UART_MODE {
_marker: PhantomData,
},
USCI_A2_SPI_MODE: USCI_A2_SPI_MODE {
_marker: PhantomData,
},
USCI_B0_I2C_MODE: USCI_B0_I2C_MODE {
_marker: PhantomData,
},
USCI_B0_SPI_MODE: USCI_B0_SPI_MODE {
_marker: PhantomData,
},
LCD_C: LCD_C {
_marker: PhantomData,
},
SFR: SFR {
_marker: PhantomData,
},
PMM: PMM {
_marker: PhantomData,
},
FLASH: FLASH {
_marker: PhantomData,
},
CRC16: CRC16 {
_marker: PhantomData,
},
RC: RC {
_marker: PhantomData,
},
WATCHDOG_TIMER: WATCHDOG_TIMER {
_marker: PhantomData,
},
UCS: UCS {
_marker: PhantomData,
},
SYS: SYS {
_marker: PhantomData,
},
SHARED_REFERENCE: SHARED_REFERENCE {
_marker: PhantomData,
},
PORT_MAPPING_CONTROL: PORT_MAPPING_CONTROL {
_marker: PhantomData,
},
PORT_J: PORT_J {
_marker: PhantomData,
},
TIMER_0_A3: TIMER_0_A3 {
_marker: PhantomData,
},
TIMER_1_A2: TIMER_1_A2 {
_marker: PhantomData,
},
TIMER_2_A2: TIMER_2_A2 {
_marker: PhantomData,
},
TIMER_3_A2: TIMER_3_A2 {
_marker: PhantomData,
},
BACKUP_RAM: BACKUP_RAM {
_marker: PhantomData,
},
MPY_16: MPY_16 {
_marker: PhantomData,
},
MPY_32: MPY_32 {
_marker: PhantomData,
},
DMA: DMA {
_marker: PhantomData,
},
ADC10_A: ADC10_A {
_marker: PhantomData,
},
SD24_B3: SD24_B3 {
_marker: PhantomData,
},
AUXILARY_SUPPLY: AUXILARY_SUPPLY {
_marker: PhantomData,
},
}
}
}