bl61x_pac/
pwm.rs

1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4    interrupt_config: INTERRUPT_CONFIG,
5    _reserved1: [u8; 0x3c],
6    group: (),
7}
8impl RegisterBlock {
9    #[doc = "0x00 - Interrupt state and clear register"]
10    #[inline(always)]
11    pub const fn interrupt_config(&self) -> &INTERRUPT_CONFIG {
12        &self.interrupt_config
13    }
14    #[doc = "0x40..0xa0 - Pulse-Width Modulation channel group"]
15    #[inline(always)]
16    pub const fn group(&self, n: usize) -> &GROUP {
17        #[allow(clippy::no_effect)]
18        [(); 2][n];
19        unsafe {
20            &*(self as *const Self)
21                .cast::<u8>()
22                .add(64)
23                .add(64 * n)
24                .cast()
25        }
26    }
27    #[doc = "Iterator for array of:"]
28    #[doc = "0x40..0xa0 - Pulse-Width Modulation channel group"]
29    #[inline(always)]
30    pub fn group_iter(&self) -> impl Iterator<Item = &GROUP> {
31        (0..2).map(|n| unsafe {
32            &*(self as *const Self)
33                .cast::<u8>()
34                .add(64)
35                .add(64 * n)
36                .cast()
37        })
38    }
39}
40#[doc = "interrupt_config (rw) register accessor: Interrupt state and clear register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`interrupt_config::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`interrupt_config::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@interrupt_config`]
41module"]
42pub type INTERRUPT_CONFIG = crate::Reg<interrupt_config::INTERRUPT_CONFIG_SPEC>;
43#[doc = "Interrupt state and clear register"]
44pub mod interrupt_config;
45#[doc = "Pulse-Width Modulation channel group"]
46pub use self::group::GROUP;
47#[doc = r"Cluster"]
48#[doc = "Pulse-Width Modulation channel group"]
49pub mod group;