moondancer_pac/generated/
uart0.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    tx_data: TX_DATA,
5    _reserved1: [u8; 0x03],
6    rx_data: RX_DATA,
7    _reserved2: [u8; 0x03],
8    tx_ready: TX_READY,
9    _reserved3: [u8; 0x03],
10    rx_avail: RX_AVAIL,
11    _reserved4: [u8; 0x03],
12    divisor: DIVISOR,
13}
14impl RegisterBlock {
15    #[doc = "0x00 - valid to write to when tx_rdy is high, will trigger a transmit"]
16    #[inline(always)]
17    pub const fn tx_data(&self) -> &TX_DATA {
18        &self.tx_data
19    }
20    #[doc = "0x04 - valid to read from when rx_avail is high, last received byte"]
21    #[inline(always)]
22    pub const fn rx_data(&self) -> &RX_DATA {
23        &self.rx_data
24    }
25    #[doc = "0x08 - is '1' when 1-byte transmit buffer is empty"]
26    #[inline(always)]
27    pub const fn tx_ready(&self) -> &TX_READY {
28        &self.tx_ready
29    }
30    #[doc = "0x0c - is '1' when 1-byte receive buffer is full; reset by a read from rx_data"]
31    #[inline(always)]
32    pub const fn rx_avail(&self) -> &RX_AVAIL {
33        &self.rx_avail
34    }
35    #[doc = "0x10 - baud rate divider, defaults to init"]
36    #[inline(always)]
37    pub const fn divisor(&self) -> &DIVISOR {
38        &self.divisor
39    }
40}
41#[doc = "tx_data (rw) register accessor: valid to write to when tx_rdy is high, will trigger a transmit\n\nYou can [`read`](crate::Reg::read) this register and get [`tx_data::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`tx_data::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@tx_data`]
42module"]
43#[doc(alias = "tx_data")]
44pub type TX_DATA = crate::Reg<tx_data::TX_DATA_SPEC>;
45#[doc = "valid to write to when tx_rdy is high, will trigger a transmit"]
46pub mod tx_data;
47#[doc = "rx_data (rw) register accessor: valid to read from when rx_avail is high, last received byte\n\nYou can [`read`](crate::Reg::read) this register and get [`rx_data::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rx_data::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rx_data`]
48module"]
49#[doc(alias = "rx_data")]
50pub type RX_DATA = crate::Reg<rx_data::RX_DATA_SPEC>;
51#[doc = "valid to read from when rx_avail is high, last received byte"]
52pub mod rx_data;
53#[doc = "tx_ready (rw) register accessor: is '1' when 1-byte transmit buffer is empty\n\nYou can [`read`](crate::Reg::read) this register and get [`tx_ready::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`tx_ready::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@tx_ready`]
54module"]
55#[doc(alias = "tx_ready")]
56pub type TX_READY = crate::Reg<tx_ready::TX_READY_SPEC>;
57#[doc = "is '1' when 1-byte transmit buffer is empty"]
58pub mod tx_ready;
59#[doc = "rx_avail (rw) register accessor: is '1' when 1-byte receive buffer is full; reset by a read from rx_data\n\nYou can [`read`](crate::Reg::read) this register and get [`rx_avail::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rx_avail::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rx_avail`]
60module"]
61#[doc(alias = "rx_avail")]
62pub type RX_AVAIL = crate::Reg<rx_avail::RX_AVAIL_SPEC>;
63#[doc = "is '1' when 1-byte receive buffer is full; reset by a read from rx_data"]
64pub mod rx_avail;
65#[doc = "divisor (rw) register accessor: baud rate divider, defaults to init\n\nYou can [`read`](crate::Reg::read) this register and get [`divisor::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`divisor::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@divisor`]
66module"]
67#[doc(alias = "divisor")]
68pub type DIVISOR = crate::Reg<divisor::DIVISOR_SPEC>;
69#[doc = "baud rate divider, defaults to init"]
70pub mod divisor;