#![doc = "Peripheral access API for MIK32 microcontrollers (generated using svd2rust v0.35.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.35.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"]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![no_std]
use core::marker::PhantomData;
use core::ops::Deref;
#[allow(unused_imports)]
use generic::*;
#[doc = r"Common register and bit access and modify traits"]
pub mod generic;
#[cfg(feature = "rt")]
extern "C" {}
#[doc(hidden)]
#[repr(C)]
pub union Vector {
pub _handler: unsafe extern "C" fn(),
pub _reserved: usize,
}
#[cfg(feature = "rt")]
#[doc(hidden)]
#[no_mangle]
pub static __EXTERNAL_INTERRUPTS: [Vector; 0] = [];
#[doc = "Прямой доступ к памяти"]
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 = 0x0004_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const dma::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
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 = "Прямой доступ к памяти"]
pub mod dma;
#[doc = "Блок управления питанием и тактированием"]
pub struct Pm {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Pm {}
impl Pm {
#[doc = r"Pointer to the register block"]
pub const PTR: *const pm::RegisterBlock = 0x0005_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const pm::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Pm {
type Target = pm::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Pm {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Pm").finish()
}
}
#[doc = "Блок управления питанием и тактированием"]
pub mod pm;
#[doc = "Программируемый контроллер прерываний"]
pub struct Epic {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Epic {}
impl Epic {
#[doc = r"Pointer to the register block"]
pub const PTR: *const epic::RegisterBlock = 0x0005_0400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const epic::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Epic {
type Target = epic::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Epic {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Epic").finish()
}
}
#[doc = "Программируемый контроллер прерываний"]
pub mod epic;
#[doc = "регистры модуля таймера_0"]
pub struct Timer32_0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer32_0 {}
impl Timer32_0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer32_0::RegisterBlock = 0x0005_0800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer32_0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Timer32_0 {
type Target = timer32_0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer32_0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer32_0").finish()
}
}
#[doc = "регистры модуля таймера_0"]
pub mod timer32_0;
#[doc = "Управление монитором напряжения VCC"]
pub struct PvdVcc {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PvdVcc {}
impl PvdVcc {
#[doc = r"Pointer to the register block"]
pub const PTR: *const pvd_vcc::RegisterBlock = 0x0005_1800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const pvd_vcc::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for PvdVcc {
type Target = pvd_vcc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PvdVcc {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PvdVcc").finish()
}
}
#[doc = "Управление монитором напряжения VCC"]
pub mod pvd_vcc;
#[doc = "Модуль управления функцией ввода/вывода"]
pub struct PadConfig {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PadConfig {}
impl PadConfig {
#[doc = r"Pointer to the register block"]
pub const PTR: *const pad_config::RegisterBlock = 0x0005_0c00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const pad_config::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for PadConfig {
type Target = pad_config::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PadConfig {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PadConfig").finish()
}
}
#[doc = "Модуль управления функцией ввода/вывода"]
pub mod pad_config;
#[doc = "Сторожевой таймер шины"]
pub struct WdtBus {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for WdtBus {}
impl WdtBus {
#[doc = r"Pointer to the register block"]
pub const PTR: *const wdt_bus::RegisterBlock = 0x0005_1000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const wdt_bus::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for WdtBus {
type Target = wdt_bus::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for WdtBus {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("WdtBus").finish()
}
}
#[doc = "Сторожевой таймер шины"]
pub mod wdt_bus;
#[doc = "Контроллер блока однократно-программируемой памяти"]
pub struct Otp {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Otp {}
impl Otp {
#[doc = r"Pointer to the register block"]
pub const PTR: *const otp::RegisterBlock = 0x0005_1400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const otp::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Otp {
type Target = otp::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Otp {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Otp").finish()
}
}
#[doc = "Контроллер блока однократно-программируемой памяти"]
pub mod otp;
#[doc = "Блок WakeUp - управление питанием системным доменом, управление источниками тактовых сигналов"]
pub struct WakeUp {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for WakeUp {}
impl WakeUp {
#[doc = r"Pointer to the register block"]
pub const PTR: *const wake_up::RegisterBlock = 0x0006_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const wake_up::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for WakeUp {
type Target = wake_up::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for WakeUp {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("WakeUp").finish()
}
}
#[doc = "Блок WakeUp - управление питанием системным доменом, управление источниками тактовых сигналов"]
pub mod wake_up;
#[doc = "Часы реального времени"]
pub struct Rtc {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Rtc {}
impl Rtc {
#[doc = r"Pointer to the register block"]
pub const PTR: *const rtc::RegisterBlock = 0x0006_0400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const rtc::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Rtc {
type Target = rtc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Rtc {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Rtc").finish()
}
}
#[doc = "Часы реального времени"]
pub mod rtc;
#[doc = "Блок управления режимом загрузки"]
pub struct BootManager {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for BootManager {}
impl BootManager {
#[doc = r"Pointer to the register block"]
pub const PTR: *const boot_manager::RegisterBlock = 0x0006_0800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const boot_manager::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for BootManager {
type Target = boot_manager::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for BootManager {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("BootManager").finish()
}
}
#[doc = "Блок управления режимом загрузки"]
pub mod boot_manager;
#[doc = "Контроллер SPIFI"]
pub struct SpifiConfig {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for SpifiConfig {}
impl SpifiConfig {
#[doc = r"Pointer to the register block"]
pub const PTR: *const spifi_config::RegisterBlock = 0x0007_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const spifi_config::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for SpifiConfig {
type Target = spifi_config::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for SpifiConfig {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SpifiConfig").finish()
}
}
#[doc = "Контроллер SPIFI"]
pub mod spifi_config;
#[doc = "Контроллер EEPROM (8Кб)"]
pub struct EepromRegs {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for EepromRegs {}
impl EepromRegs {
#[doc = r"Pointer to the register block"]
pub const PTR: *const eeprom_regs::RegisterBlock = 0x0007_0400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const eeprom_regs::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for EepromRegs {
type Target = eeprom_regs::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for EepromRegs {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("EepromRegs").finish()
}
}
#[doc = "Контроллер EEPROM (8Кб)"]
pub mod eeprom_regs;
#[doc = "Крипто-блок"]
pub struct Crypto {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Crypto {}
impl Crypto {
#[doc = r"Pointer to the register block"]
pub const PTR: *const crypto::RegisterBlock = 0x0008_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const crypto::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Crypto {
type Target = crypto::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Crypto {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Crypto").finish()
}
}
#[doc = "Крипто-блок"]
pub mod crypto;
#[doc = "Блок вычисления контрольных сумм"]
pub struct Crc {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Crc {}
impl Crc {
#[doc = r"Pointer to the register block"]
pub const PTR: *const crc::RegisterBlock = 0x0008_0400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const crc::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Crc {
type Target = crc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Crc {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Crc").finish()
}
}
#[doc = "Блок вычисления контрольных сумм"]
pub mod crc;
#[doc = "Сторожевой таймер"]
pub struct Wdt {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Wdt {}
impl Wdt {
#[doc = r"Pointer to the register block"]
pub const PTR: *const wdt::RegisterBlock = 0x0008_1000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const wdt::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Wdt {
type Target = wdt::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Wdt {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Wdt").finish()
}
}
#[doc = "Сторожевой таймер"]
pub mod wdt;
#[doc = "приемо-передатчик"]
pub struct Usart0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Usart0 {}
impl Usart0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usart_0::RegisterBlock = 0x0008_1400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usart_0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Usart0 {
type Target = usart_0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Usart0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Usart0").finish()
}
}
#[doc = "приемо-передатчик"]
pub mod usart_0;
#[doc = "приемо-передатчик"]
pub struct Usart1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Usart1 {}
impl Usart1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usart_0::RegisterBlock = 0x0008_1800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usart_0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Usart1 {
type Target = usart_0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Usart1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Usart1").finish()
}
}
#[doc = "приемо-передатчик"]
pub use usart_0 as usart_1;
#[doc = "Регистры модуля таймера_0"]
pub struct Timer16_0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer16_0 {}
impl Timer16_0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer16_0::RegisterBlock = 0x0008_1c00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer16_0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Timer16_0 {
type Target = timer16_0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer16_0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer16_0").finish()
}
}
#[doc = "Регистры модуля таймера_0"]
pub mod timer16_0;
#[doc = "Регистры модуля таймера_1"]
pub struct Timer16_1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer16_1 {}
impl Timer16_1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer16_1::RegisterBlock = 0x0008_2000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer16_1::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Timer16_1 {
type Target = timer16_1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer16_1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer16_1").finish()
}
}
#[doc = "Регистры модуля таймера_1"]
pub mod timer16_1;
#[doc = "Регистры модуля таймера_2"]
pub struct Timer16_2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer16_2 {}
impl Timer16_2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer16_2::RegisterBlock = 0x0008_2400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer16_2::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Timer16_2 {
type Target = timer16_2::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer16_2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer16_2").finish()
}
}
#[doc = "Регистры модуля таймера_2"]
pub mod timer16_2;
#[doc = "регистры модуля таймера_1"]
pub struct Timer32_1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer32_1 {}
impl Timer32_1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer32_1::RegisterBlock = 0x0008_2800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer32_1::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Timer32_1 {
type Target = timer32_1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer32_1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer32_1").finish()
}
}
#[doc = "регистры модуля таймера_1"]
pub mod timer32_1;
#[doc = "регистры модуля таймера_2"]
pub struct Timer32_2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer32_2 {}
impl Timer32_2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer32_2::RegisterBlock = 0x0008_2c00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer32_2::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Timer32_2 {
type Target = timer32_2::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer32_2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer32_2").finish()
}
}
#[doc = "регистры модуля таймера_2"]
pub mod timer32_2;
#[doc = "Модуль обеспечивает взаимодействие с различными периферийными устройствами"]
pub struct Spi0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Spi0 {}
impl Spi0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const spi_0::RegisterBlock = 0x0008_3000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const spi_0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Spi0 {
type Target = spi_0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Spi0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Spi0").finish()
}
}
#[doc = "Модуль обеспечивает взаимодействие с различными периферийными устройствами"]
pub mod spi_0;
#[doc = "Модуль обеспечивает взаимодействие с различными периферийными устройствами"]
pub struct Spi1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Spi1 {}
impl Spi1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const spi_1::RegisterBlock = 0x0008_3400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const spi_1::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Spi1 {
type Target = spi_1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Spi1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Spi1").finish()
}
}
#[doc = "Модуль обеспечивает взаимодействие с различными периферийными устройствами"]
pub mod spi_1;
#[doc = "Модуль обеспечивает интерфейс для связи контроллера и последовательной шины I2C"]
pub struct I2c0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for I2c0 {}
impl I2c0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const i2c_0::RegisterBlock = 0x0008_3800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const i2c_0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for I2c0 {
type Target = i2c_0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for I2c0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("I2c0").finish()
}
}
#[doc = "Модуль обеспечивает интерфейс для связи контроллера и последовательной шины I2C"]
pub mod i2c_0;
#[doc = "Модуль обеспечивает интерфейс для связи контроллера и последовательной шины I2C"]
pub struct I2c1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for I2c1 {}
impl I2c1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const i2c_1::RegisterBlock = 0x0008_3c00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const i2c_1::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for I2c1 {
type Target = i2c_1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for I2c1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("I2c1").finish()
}
}
#[doc = "Модуль обеспечивает интерфейс для связи контроллера и последовательной шины I2C"]
pub mod i2c_1;
#[doc = "Модуль ввода/вывода"]
pub struct Gpio16_0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Gpio16_0 {}
impl Gpio16_0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpio16_0::RegisterBlock = 0x0008_4000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpio16_0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Gpio16_0 {
type Target = gpio16_0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Gpio16_0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Gpio16_0").finish()
}
}
#[doc = "Модуль ввода/вывода"]
pub mod gpio16_0;
#[doc = "Модуль ввода/вывода"]
pub struct Gpio16_1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Gpio16_1 {}
impl Gpio16_1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpio16_1::RegisterBlock = 0x0008_4400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpio16_1::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Gpio16_1 {
type Target = gpio16_1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Gpio16_1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Gpio16_1").finish()
}
}
#[doc = "Модуль ввода/вывода"]
pub mod gpio16_1;
#[doc = "Модуль ввода/вывода"]
pub struct Gpio8_2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Gpio8_2 {}
impl Gpio8_2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpio8_2::RegisterBlock = 0x0008_4800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpio8_2::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Gpio8_2 {
type Target = gpio8_2::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Gpio8_2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Gpio8_2").finish()
}
}
#[doc = "Модуль ввода/вывода"]
pub mod gpio8_2;
#[doc = "Модуль формирования прерываний"]
pub struct GpioIrq {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for GpioIrq {}
impl GpioIrq {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpio_irq::RegisterBlock = 0x0008_4c00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpio_irq::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for GpioIrq {
type Target = gpio_irq::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for GpioIrq {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GpioIrq").finish()
}
}
#[doc = "Модуль формирования прерываний"]
pub mod gpio_irq;
#[doc = "Управление ЦАП"]
pub struct Dac0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Dac0 {}
impl Dac0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const dac0::RegisterBlock = 0x0008_5000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const dac0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Dac0 {
type Target = dac0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Dac0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Dac0").finish()
}
}
#[doc = "Управление ЦАП"]
pub mod dac0;
#[doc = "Управление ЦАП"]
pub struct Dac1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Dac1 {}
impl Dac1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const dac1::RegisterBlock = 0x0008_5008 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const dac1::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Dac1 {
type Target = dac1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Dac1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Dac1").finish()
}
}
#[doc = "Управление ЦАП"]
pub mod dac1;
#[doc = "Управление монитором напряжения AVCC"]
pub struct PvdAvcc {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PvdAvcc {}
impl PvdAvcc {
#[doc = r"Pointer to the register block"]
pub const PTR: *const pvd_avcc::RegisterBlock = 0x0008_5010 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const pvd_avcc::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for PvdAvcc {
type Target = pvd_avcc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PvdAvcc {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PvdAvcc").finish()
}
}
#[doc = "Управление монитором напряжения AVCC"]
pub mod pvd_avcc;
#[doc = "Управление температурным сенсором"]
pub struct Tsens {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Tsens {}
impl Tsens {
#[doc = r"Pointer to the register block"]
pub const PTR: *const tsens::RegisterBlock = 0x0008_501c as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const tsens::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Tsens {
type Target = tsens::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Tsens {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Tsens").finish()
}
}
#[doc = "Управление температурным сенсором"]
pub mod tsens;
#[doc = "Управление калибруемыми источниками напряжения и тока"]
pub struct RefvConfig {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for RefvConfig {}
impl RefvConfig {
#[doc = r"Pointer to the register block"]
pub const PTR: *const refv_config::RegisterBlock = 0x0008_5038 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const refv_config::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for RefvConfig {
type Target = refv_config::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for RefvConfig {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("RefvConfig").finish()
}
}
#[doc = "Управление калибруемыми источниками напряжения и тока"]
pub mod refv_config;
#[doc = "Управление АЦП"]
pub struct Adc {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Adc {}
impl Adc {
#[doc = r"Pointer to the register block"]
pub const PTR: *const adc::RegisterBlock = 0x0008_503c as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const adc::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Adc {
type Target = adc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Adc {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Adc").finish()
}
}
#[doc = "Управление АЦП"]
pub mod adc;
#[doc = "Регистры системного таймера"]
pub struct Scr1Timer {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Scr1Timer {}
impl Scr1Timer {
#[doc = r"Pointer to the register block"]
pub const PTR: *const scr1_timer::RegisterBlock = 0x0049_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const scr1_timer::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Scr1Timer {
type Target = scr1_timer::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Scr1Timer {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Scr1Timer").finish()
}
}
#[doc = "Регистры системного таймера"]
pub mod scr1_timer;
#[unsafe(no_mangle)]
static mut DEVICE_PERIPHERALS: bool = false;
#[doc = r" All the peripherals."]
#[allow(non_snake_case)]
pub struct Peripherals {
#[doc = "DMA"]
pub dma: Dma,
#[doc = "PM"]
pub pm: Pm,
#[doc = "EPIC"]
pub epic: Epic,
#[doc = "TIMER32_0"]
pub timer32_0: Timer32_0,
#[doc = "PVD_VCC"]
pub pvd_vcc: PvdVcc,
#[doc = "PAD_CONFIG"]
pub pad_config: PadConfig,
#[doc = "WDT_BUS"]
pub wdt_bus: WdtBus,
#[doc = "OTP"]
pub otp: Otp,
#[doc = "WakeUp"]
pub wake_up: WakeUp,
#[doc = "RTC"]
pub rtc: Rtc,
#[doc = "BOOT_MANAGER"]
pub boot_manager: BootManager,
#[doc = "SPIFI_CONFIG"]
pub spifi_config: SpifiConfig,
#[doc = "EEPROM_REGS"]
pub eeprom_regs: EepromRegs,
#[doc = "CRYPTO"]
pub crypto: Crypto,
#[doc = "CRC"]
pub crc: Crc,
#[doc = "WDT"]
pub wdt: Wdt,
#[doc = "USART_0"]
pub usart_0: Usart0,
#[doc = "USART_1"]
pub usart_1: Usart1,
#[doc = "TIMER16_0"]
pub timer16_0: Timer16_0,
#[doc = "TIMER16_1"]
pub timer16_1: Timer16_1,
#[doc = "TIMER16_2"]
pub timer16_2: Timer16_2,
#[doc = "TIMER32_1"]
pub timer32_1: Timer32_1,
#[doc = "TIMER32_2"]
pub timer32_2: Timer32_2,
#[doc = "SPI_0"]
pub spi_0: Spi0,
#[doc = "SPI_1"]
pub spi_1: Spi1,
#[doc = "I2C_0"]
pub i2c_0: I2c0,
#[doc = "I2C_1"]
pub i2c_1: I2c1,
#[doc = "GPIO16_0"]
pub gpio16_0: Gpio16_0,
#[doc = "GPIO16_1"]
pub gpio16_1: Gpio16_1,
#[doc = "GPIO8_2"]
pub gpio8_2: Gpio8_2,
#[doc = "GPIO_IRQ"]
pub gpio_irq: GpioIrq,
#[doc = "DAC0"]
pub dac0: Dac0,
#[doc = "DAC1"]
pub dac1: Dac1,
#[doc = "PVD_AVCC"]
pub pvd_avcc: PvdAvcc,
#[doc = "TSENS"]
pub tsens: Tsens,
#[doc = "REFV_CONFIG"]
pub refv_config: RefvConfig,
#[doc = "ADC"]
pub adc: Adc,
#[doc = "SCR1_TIMER"]
pub scr1_timer: Scr1Timer,
}
impl Peripherals {
#[doc = r" Returns all the peripherals *once*."]
#[cfg(feature = "critical-section")]
#[inline]
pub fn take() -> Option<Self> {
critical_section::with(|_| {
if unsafe { DEVICE_PERIPHERALS } {
return None;
}
Some(unsafe { Peripherals::steal() })
})
}
#[doc = r" Unchecked version of `Peripherals::take`."]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Each of the returned peripherals must be used at most once."]
#[inline]
pub unsafe fn steal() -> Self {
unsafe { DEVICE_PERIPHERALS = true };
Peripherals {
dma: unsafe { Dma::steal() },
pm: unsafe { Pm::steal() },
epic: unsafe { Epic::steal() },
timer32_0: unsafe { Timer32_0::steal() },
pvd_vcc: unsafe { PvdVcc::steal() },
pad_config: unsafe { PadConfig::steal() },
wdt_bus: unsafe { WdtBus::steal() },
otp: unsafe { Otp::steal() },
wake_up: unsafe { WakeUp::steal() },
rtc: unsafe { Rtc::steal() },
boot_manager: unsafe { BootManager::steal() },
spifi_config: unsafe { SpifiConfig::steal() },
eeprom_regs: unsafe { EepromRegs::steal() },
crypto: unsafe { Crypto::steal() },
crc: unsafe { Crc::steal() },
wdt: unsafe { Wdt::steal() },
usart_0: unsafe { Usart0::steal() },
usart_1: unsafe { Usart1::steal() },
timer16_0: unsafe { Timer16_0::steal() },
timer16_1: unsafe { Timer16_1::steal() },
timer16_2: unsafe { Timer16_2::steal() },
timer32_1: unsafe { Timer32_1::steal() },
timer32_2: unsafe { Timer32_2::steal() },
spi_0: unsafe { Spi0::steal() },
spi_1: unsafe { Spi1::steal() },
i2c_0: unsafe { I2c0::steal() },
i2c_1: unsafe { I2c1::steal() },
gpio16_0: unsafe { Gpio16_0::steal() },
gpio16_1: unsafe { Gpio16_1::steal() },
gpio8_2: unsafe { Gpio8_2::steal() },
gpio_irq: unsafe { GpioIrq::steal() },
dac0: unsafe { Dac0::steal() },
dac1: unsafe { Dac1::steal() },
pvd_avcc: unsafe { PvdAvcc::steal() },
tsens: unsafe { Tsens::steal() },
refv_config: unsafe { RefvConfig::steal() },
adc: unsafe { Adc::steal() },
scr1_timer: unsafe { Scr1Timer::steal() },
}
}
}