Skip to content

Commit

Permalink
regenerate with svd2rust 0.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ithinuel committed Dec 7, 2021
1 parent 3ea2be3 commit 5cd0dbb
Show file tree
Hide file tree
Showing 409 changed files with 4,281 additions and 536 deletions.
28 changes: 23 additions & 5 deletions src/adc/cs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ impl From<crate::W<CS_SPEC>> for W {
AINSEL will be updated after each conversion with the newly-selected channel."]
pub struct RROBIN_R(crate::FieldReader<u8, u8>);
impl RROBIN_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
RROBIN_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -69,6 +70,7 @@ impl<'a> RROBIN_W<'a> {
#[doc = "Field `AINSEL` reader - Select analog mux input. Updated automatically in round-robin mode."]
pub struct AINSEL_R(crate::FieldReader<u8, u8>);
impl AINSEL_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
AINSEL_R(crate::FieldReader::new(bits))
}
Expand All @@ -95,6 +97,7 @@ impl<'a> AINSEL_W<'a> {
#[doc = "Field `ERR_STICKY` reader - Some past ADC conversion encountered an error. Write 1 to clear."]
pub struct ERR_STICKY_R(crate::FieldReader<bool, bool>);
impl ERR_STICKY_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
ERR_STICKY_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -131,6 +134,7 @@ impl<'a> ERR_STICKY_W<'a> {
#[doc = "Field `ERR` reader - The most recent ADC conversion encountered an error; result is undefined or noisy."]
pub struct ERR_R(crate::FieldReader<bool, bool>);
impl ERR_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
ERR_R(crate::FieldReader::new(bits))
}
Expand All @@ -146,6 +150,7 @@ impl core::ops::Deref for ERR_R {
0 whilst conversion in progress."]
pub struct READY_R(crate::FieldReader<bool, bool>);
impl READY_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
READY_R(crate::FieldReader::new(bits))
}
Expand All @@ -160,6 +165,7 @@ impl core::ops::Deref for READY_R {
#[doc = "Field `START_MANY` reader - Continuously perform conversions whilst this bit is 1. A new conversion will start immediately after the previous finishes."]
pub struct START_MANY_R(crate::FieldReader<bool, bool>);
impl START_MANY_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
START_MANY_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -196,6 +202,7 @@ impl<'a> START_MANY_W<'a> {
#[doc = "Field `START_ONCE` reader - Start a single conversion. Self-clearing. Ignored if start_many is asserted."]
pub struct START_ONCE_R(crate::FieldReader<bool, bool>);
impl START_ONCE_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
START_ONCE_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -232,6 +239,7 @@ impl<'a> START_ONCE_W<'a> {
#[doc = "Field `TS_EN` reader - Power on temperature sensor. 1 - enabled. 0 - disabled."]
pub struct TS_EN_R(crate::FieldReader<bool, bool>);
impl TS_EN_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
TS_EN_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -269,6 +277,7 @@ impl<'a> TS_EN_W<'a> {
1 - enabled. 0 - disabled."]
pub struct EN_R(crate::FieldReader<bool, bool>);
impl EN_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
EN_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -304,7 +313,10 @@ impl<'a> EN_W<'a> {
}
}
impl R {
#[doc = "Bits 16:20 - Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable. Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion. The first channel to be sampled will be the one currently indicated by AINSEL. AINSEL will be updated after each conversion with the newly-selected channel."]
#[doc = "Bits 16:20 - Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable.
Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion.
The first channel to be sampled will be the one currently indicated by AINSEL.
AINSEL will be updated after each conversion with the newly-selected channel."]
#[inline(always)]
pub fn rrobin(&self) -> RROBIN_R {
RROBIN_R::new(((self.bits >> 16) & 0x1f) as u8)
Expand All @@ -324,7 +336,8 @@ impl R {
pub fn err(&self) -> ERR_R {
ERR_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 8 - 1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed. 0 whilst conversion in progress."]
#[doc = "Bit 8 - 1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed.
0 whilst conversion in progress."]
#[inline(always)]
pub fn ready(&self) -> READY_R {
READY_R::new(((self.bits >> 8) & 0x01) != 0)
Expand All @@ -344,14 +357,18 @@ impl R {
pub fn ts_en(&self) -> TS_EN_R {
TS_EN_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - Power on ADC and enable its clock. 1 - enabled. 0 - disabled."]
#[doc = "Bit 0 - Power on ADC and enable its clock.
1 - enabled. 0 - disabled."]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bits 16:20 - Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable. Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion. The first channel to be sampled will be the one currently indicated by AINSEL. AINSEL will be updated after each conversion with the newly-selected channel."]
#[doc = "Bits 16:20 - Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable.
Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion.
The first channel to be sampled will be the one currently indicated by AINSEL.
AINSEL will be updated after each conversion with the newly-selected channel."]
#[inline(always)]
pub fn rrobin(&mut self) -> RROBIN_W {
RROBIN_W { w: self }
Expand Down Expand Up @@ -381,7 +398,8 @@ impl W {
pub fn ts_en(&mut self) -> TS_EN_W {
TS_EN_W { w: self }
}
#[doc = "Bit 0 - Power on ADC and enable its clock. 1 - enabled. 0 - disabled."]
#[doc = "Bit 0 - Power on ADC and enable its clock.
1 - enabled. 0 - disabled."]
#[inline(always)]
pub fn en(&mut self) -> EN_W {
EN_W { w: self }
Expand Down
2 changes: 2 additions & 0 deletions src/adc/div.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ impl From<crate::W<DIV_SPEC>> for W {
#[doc = "Field `INT` reader - Integer part of clock divisor."]
pub struct INT_R(crate::FieldReader<u16, u16>);
impl INT_R {
#[inline(always)]
pub(crate) fn new(bits: u16) -> Self {
INT_R(crate::FieldReader::new(bits))
}
Expand All @@ -63,6 +64,7 @@ impl<'a> INT_W<'a> {
#[doc = "Field `FRAC` reader - Fractional part of clock divisor. First-order delta-sigma."]
pub struct FRAC_R(crate::FieldReader<u8, u8>);
impl FRAC_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
FRAC_R(crate::FieldReader::new(bits))
}
Expand Down
10 changes: 10 additions & 0 deletions src/adc/fcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ impl From<crate::W<FCS_SPEC>> for W {
#[doc = "Field `THRESH` reader - DREQ/IRQ asserted when level >= threshold"]
pub struct THRESH_R(crate::FieldReader<u8, u8>);
impl THRESH_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
THRESH_R(crate::FieldReader::new(bits))
}
Expand All @@ -63,6 +64,7 @@ impl<'a> THRESH_W<'a> {
#[doc = "Field `LEVEL` reader - The number of conversion results currently waiting in the FIFO"]
pub struct LEVEL_R(crate::FieldReader<u8, u8>);
impl LEVEL_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
LEVEL_R(crate::FieldReader::new(bits))
}
Expand All @@ -77,6 +79,7 @@ impl core::ops::Deref for LEVEL_R {
#[doc = "Field `OVER` reader - 1 if the FIFO has been overflowed. Write 1 to clear."]
pub struct OVER_R(crate::FieldReader<bool, bool>);
impl OVER_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
OVER_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -113,6 +116,7 @@ impl<'a> OVER_W<'a> {
#[doc = "Field `UNDER` reader - 1 if the FIFO has been underflowed. Write 1 to clear."]
pub struct UNDER_R(crate::FieldReader<bool, bool>);
impl UNDER_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
UNDER_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -149,6 +153,7 @@ impl<'a> UNDER_W<'a> {
#[doc = "Field `FULL` reader - "]
pub struct FULL_R(crate::FieldReader<bool, bool>);
impl FULL_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FULL_R(crate::FieldReader::new(bits))
}
Expand All @@ -163,6 +168,7 @@ impl core::ops::Deref for FULL_R {
#[doc = "Field `EMPTY` reader - "]
pub struct EMPTY_R(crate::FieldReader<bool, bool>);
impl EMPTY_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
EMPTY_R(crate::FieldReader::new(bits))
}
Expand All @@ -177,6 +183,7 @@ impl core::ops::Deref for EMPTY_R {
#[doc = "Field `DREQ_EN` reader - If 1: assert DMA requests when FIFO contains data"]
pub struct DREQ_EN_R(crate::FieldReader<bool, bool>);
impl DREQ_EN_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
DREQ_EN_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -213,6 +220,7 @@ impl<'a> DREQ_EN_W<'a> {
#[doc = "Field `ERR` reader - If 1: conversion error bit appears in the FIFO alongside the result"]
pub struct ERR_R(crate::FieldReader<bool, bool>);
impl ERR_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
ERR_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -249,6 +257,7 @@ impl<'a> ERR_W<'a> {
#[doc = "Field `SHIFT` reader - If 1: FIFO results are right-shifted to be one byte in size. Enables DMA to byte buffers."]
pub struct SHIFT_R(crate::FieldReader<bool, bool>);
impl SHIFT_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
SHIFT_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -285,6 +294,7 @@ impl<'a> SHIFT_W<'a> {
#[doc = "Field `EN` reader - If 1: write result to the FIFO after each conversion."]
pub struct EN_R(crate::FieldReader<bool, bool>);
impl EN_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
EN_R(crate::FieldReader::new(bits))
}
Expand Down
2 changes: 2 additions & 0 deletions src/adc/fifo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ impl From<crate::R<FIFO_SPEC>> for R {
#[doc = "Field `ERR` reader - 1 if this particular sample experienced a conversion error. Remains in the same location if the sample is shifted."]
pub struct ERR_R(crate::FieldReader<bool, bool>);
impl ERR_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
ERR_R(crate::FieldReader::new(bits))
}
Expand All @@ -30,6 +31,7 @@ impl core::ops::Deref for ERR_R {
#[doc = "Field `VAL` reader - "]
pub struct VAL_R(crate::FieldReader<u16, u16>);
impl VAL_R {
#[inline(always)]
pub(crate) fn new(bits: u16) -> Self {
VAL_R(crate::FieldReader::new(bits))
}
Expand Down
7 changes: 5 additions & 2 deletions src/adc/inte.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ impl From<crate::W<INTE_SPEC>> for W {
This level can be programmed via the FCS_THRESH field."]
pub struct FIFO_R(crate::FieldReader<bool, bool>);
impl FIFO_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -73,14 +74,16 @@ impl<'a> FIFO_W<'a> {
}
}
impl R {
#[doc = "Bit 0 - Triggered when the sample FIFO reaches a certain level. This level can be programmed via the FCS_THRESH field."]
#[doc = "Bit 0 - Triggered when the sample FIFO reaches a certain level.
This level can be programmed via the FCS_THRESH field."]
#[inline(always)]
pub fn fifo(&self) -> FIFO_R {
FIFO_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Triggered when the sample FIFO reaches a certain level. This level can be programmed via the FCS_THRESH field."]
#[doc = "Bit 0 - Triggered when the sample FIFO reaches a certain level.
This level can be programmed via the FCS_THRESH field."]
#[inline(always)]
pub fn fifo(&mut self) -> FIFO_W {
FIFO_W { w: self }
Expand Down
7 changes: 5 additions & 2 deletions src/adc/intf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ impl From<crate::W<INTF_SPEC>> for W {
This level can be programmed via the FCS_THRESH field."]
pub struct FIFO_R(crate::FieldReader<bool, bool>);
impl FIFO_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -73,14 +74,16 @@ impl<'a> FIFO_W<'a> {
}
}
impl R {
#[doc = "Bit 0 - Triggered when the sample FIFO reaches a certain level. This level can be programmed via the FCS_THRESH field."]
#[doc = "Bit 0 - Triggered when the sample FIFO reaches a certain level.
This level can be programmed via the FCS_THRESH field."]
#[inline(always)]
pub fn fifo(&self) -> FIFO_R {
FIFO_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Triggered when the sample FIFO reaches a certain level. This level can be programmed via the FCS_THRESH field."]
#[doc = "Bit 0 - Triggered when the sample FIFO reaches a certain level.
This level can be programmed via the FCS_THRESH field."]
#[inline(always)]
pub fn fifo(&mut self) -> FIFO_W {
FIFO_W { w: self }
Expand Down
4 changes: 3 additions & 1 deletion src/adc/intr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ impl From<crate::R<INTR_SPEC>> for R {
This level can be programmed via the FCS_THRESH field."]
pub struct FIFO_R(crate::FieldReader<bool, bool>);
impl FIFO_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_R(crate::FieldReader::new(bits))
}
Expand All @@ -29,7 +30,8 @@ impl core::ops::Deref for FIFO_R {
}
}
impl R {
#[doc = "Bit 0 - Triggered when the sample FIFO reaches a certain level. This level can be programmed via the FCS_THRESH field."]
#[doc = "Bit 0 - Triggered when the sample FIFO reaches a certain level.
This level can be programmed via the FCS_THRESH field."]
#[inline(always)]
pub fn fifo(&self) -> FIFO_R {
FIFO_R::new((self.bits & 0x01) != 0)
Expand Down
4 changes: 3 additions & 1 deletion src/adc/ints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ impl From<crate::R<INTS_SPEC>> for R {
This level can be programmed via the FCS_THRESH field."]
pub struct FIFO_R(crate::FieldReader<bool, bool>);
impl FIFO_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
FIFO_R(crate::FieldReader::new(bits))
}
Expand All @@ -29,7 +30,8 @@ impl core::ops::Deref for FIFO_R {
}
}
impl R {
#[doc = "Bit 0 - Triggered when the sample FIFO reaches a certain level. This level can be programmed via the FCS_THRESH field."]
#[doc = "Bit 0 - Triggered when the sample FIFO reaches a certain level.
This level can be programmed via the FCS_THRESH field."]
#[inline(always)]
pub fn fifo(&self) -> FIFO_R {
FIFO_R::new((self.bits & 0x01) != 0)
Expand Down
1 change: 1 addition & 0 deletions src/adc/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ impl From<crate::R<RESULT_SPEC>> for R {
#[doc = "Field `RESULT` reader - "]
pub struct RESULT_R(crate::FieldReader<u16, u16>);
impl RESULT_R {
#[inline(always)]
pub(crate) fn new(bits: u16) -> Self {
RESULT_R(crate::FieldReader::new(bits))
}
Expand Down
4 changes: 4 additions & 0 deletions src/busctrl/bus_priority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ impl From<crate::W<BUS_PRIORITY_SPEC>> for W {
#[doc = "Field `DMA_W` reader - 0 - low priority, 1 - high priority"]
pub struct DMA_W_R(crate::FieldReader<bool, bool>);
impl DMA_W_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
DMA_W_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -73,6 +74,7 @@ impl<'a> DMA_W_W<'a> {
#[doc = "Field `DMA_R` reader - 0 - low priority, 1 - high priority"]
pub struct DMA_R_R(crate::FieldReader<bool, bool>);
impl DMA_R_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
DMA_R_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -109,6 +111,7 @@ impl<'a> DMA_R_W<'a> {
#[doc = "Field `PROC1` reader - 0 - low priority, 1 - high priority"]
pub struct PROC1_R(crate::FieldReader<bool, bool>);
impl PROC1_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
PROC1_R(crate::FieldReader::new(bits))
}
Expand Down Expand Up @@ -145,6 +148,7 @@ impl<'a> PROC1_W<'a> {
#[doc = "Field `PROC0` reader - 0 - low priority, 1 - high priority"]
pub struct PROC0_R(crate::FieldReader<bool, bool>);
impl PROC0_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
PROC0_R(crate::FieldReader::new(bits))
}
Expand Down
5 changes: 4 additions & 1 deletion src/busctrl/bus_priority_ack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ impl From<crate::R<BUS_PRIORITY_ACK_SPEC>> for R {
In normal circumstances this will happen almost immediately."]
pub struct BUS_PRIORITY_ACK_R(crate::FieldReader<bool, bool>);
impl BUS_PRIORITY_ACK_R {
#[inline(always)]
pub(crate) fn new(bits: bool) -> Self {
BUS_PRIORITY_ACK_R(crate::FieldReader::new(bits))
}
Expand All @@ -30,7 +31,9 @@ impl core::ops::Deref for BUS_PRIORITY_ACK_R {
}
}
impl R {
#[doc = "Bit 0 - Goes to 1 once all arbiters have registered the new global priority levels. Arbiters update their local priority when servicing a new nonsequential access. In normal circumstances this will happen almost immediately."]
#[doc = "Bit 0 - Goes to 1 once all arbiters have registered the new global priority levels.
Arbiters update their local priority when servicing a new nonsequential access.
In normal circumstances this will happen almost immediately."]
#[inline(always)]
pub fn bus_priority_ack(&self) -> BUS_PRIORITY_ACK_R {
BUS_PRIORITY_ACK_R::new((self.bits & 0x01) != 0)
Expand Down
Loading

0 comments on commit 5cd0dbb

Please sign in to comment.