#[doc = "Register `CCR8` reader"]
pub struct R(crate::R<CCR8_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CCR8_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CCR8_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CCR8_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CCR8` writer"]
pub struct W(crate::W<CCR8_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CCR8_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CCR8_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CCR8_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EN` reader - channel enable"]
pub struct EN_R(crate::FieldReader<bool, bool>);
impl EN_R {
pub(crate) fn new(bits: bool) -> Self {
EN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for EN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `EN` writer - channel enable"]
pub struct EN_W<'a> {
w: &'a mut W,
}
impl<'a> EN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
self.w
}
}
#[doc = "Field `TCIE` reader - TCIE"]
pub struct TCIE_R(crate::FieldReader<bool, bool>);
impl TCIE_R {
pub(crate) fn new(bits: bool) -> Self {
TCIE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TCIE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TCIE` writer - TCIE"]
pub struct TCIE_W<'a> {
w: &'a mut W,
}
impl<'a> TCIE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
self.w
}
}
#[doc = "Field `HTIE` reader - HTIE"]
pub struct HTIE_R(crate::FieldReader<bool, bool>);
impl HTIE_R {
pub(crate) fn new(bits: bool) -> Self {
HTIE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for HTIE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `HTIE` writer - HTIE"]
pub struct HTIE_W<'a> {
w: &'a mut W,
}
impl<'a> HTIE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
self.w
}
}
#[doc = "Field `TEIE` reader - TEIE"]
pub struct TEIE_R(crate::FieldReader<bool, bool>);
impl TEIE_R {
pub(crate) fn new(bits: bool) -> Self {
TEIE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TEIE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TEIE` writer - TEIE"]
pub struct TEIE_W<'a> {
w: &'a mut W,
}
impl<'a> TEIE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
self.w
}
}
#[doc = "Field `DIR` reader - DIR"]
pub struct DIR_R(crate::FieldReader<bool, bool>);
impl DIR_R {
pub(crate) fn new(bits: bool) -> Self {
DIR_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DIR_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DIR` writer - DIR"]
pub struct DIR_W<'a> {
w: &'a mut W,
}
impl<'a> DIR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
self.w
}
}
#[doc = "Field `CIRC` reader - CIRC"]
pub struct CIRC_R(crate::FieldReader<bool, bool>);
impl CIRC_R {
pub(crate) fn new(bits: bool) -> Self {
CIRC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for CIRC_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `CIRC` writer - CIRC"]
pub struct CIRC_W<'a> {
w: &'a mut W,
}
impl<'a> CIRC_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
self.w
}
}
#[doc = "Field `PINC` reader - PINC"]
pub struct PINC_R(crate::FieldReader<bool, bool>);
impl PINC_R {
pub(crate) fn new(bits: bool) -> Self {
PINC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PINC_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PINC` writer - PINC"]
pub struct PINC_W<'a> {
w: &'a mut W,
}
impl<'a> PINC_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
self.w
}
}
#[doc = "Field `MINC` reader - MINC"]
pub struct MINC_R(crate::FieldReader<bool, bool>);
impl MINC_R {
pub(crate) fn new(bits: bool) -> Self {
MINC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for MINC_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `MINC` writer - MINC"]
pub struct MINC_W<'a> {
w: &'a mut W,
}
impl<'a> MINC_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
self.w
}
}
#[doc = "Field `PSIZE` reader - PSIZE"]
pub struct PSIZE_R(crate::FieldReader<u8, u8>);
impl PSIZE_R {
pub(crate) fn new(bits: u8) -> Self {
PSIZE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PSIZE_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PSIZE` writer - PSIZE"]
pub struct PSIZE_W<'a> {
w: &'a mut W,
}
impl<'a> PSIZE_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8);
self.w
}
}
#[doc = "Field `MSIZE` reader - MSIZE"]
pub struct MSIZE_R(crate::FieldReader<u8, u8>);
impl MSIZE_R {
pub(crate) fn new(bits: u8) -> Self {
MSIZE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for MSIZE_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `MSIZE` writer - MSIZE"]
pub struct MSIZE_W<'a> {
w: &'a mut W,
}
impl<'a> MSIZE_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10);
self.w
}
}
#[doc = "Field `PL` reader - PL"]
pub struct PL_R(crate::FieldReader<u8, u8>);
impl PL_R {
pub(crate) fn new(bits: u8) -> Self {
PL_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PL_R {
type Target = crate::FieldReader<u8, u8>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PL` writer - PL"]
pub struct PL_W<'a> {
w: &'a mut W,
}
impl<'a> PL_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12);
self.w
}
}
#[doc = "Field `MEM2MEM` reader - MEM2MEM"]
pub struct MEM2MEM_R(crate::FieldReader<bool, bool>);
impl MEM2MEM_R {
pub(crate) fn new(bits: bool) -> Self {
MEM2MEM_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for MEM2MEM_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `MEM2MEM` writer - MEM2MEM"]
pub struct MEM2MEM_W<'a> {
w: &'a mut W,
}
impl<'a> MEM2MEM_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14);
self.w
}
}
impl R {
#[doc = "Bit 0 - channel enable"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - TCIE"]
#[inline(always)]
pub fn tcie(&self) -> TCIE_R {
TCIE_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - HTIE"]
#[inline(always)]
pub fn htie(&self) -> HTIE_R {
HTIE_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - TEIE"]
#[inline(always)]
pub fn teie(&self) -> TEIE_R {
TEIE_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - DIR"]
#[inline(always)]
pub fn dir(&self) -> DIR_R {
DIR_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - CIRC"]
#[inline(always)]
pub fn circ(&self) -> CIRC_R {
CIRC_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - PINC"]
#[inline(always)]
pub fn pinc(&self) -> PINC_R {
PINC_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - MINC"]
#[inline(always)]
pub fn minc(&self) -> MINC_R {
MINC_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bits 8:9 - PSIZE"]
#[inline(always)]
pub fn psize(&self) -> PSIZE_R {
PSIZE_R::new(((self.bits >> 8) & 0x03) as u8)
}
#[doc = "Bits 10:11 - MSIZE"]
#[inline(always)]
pub fn msize(&self) -> MSIZE_R {
MSIZE_R::new(((self.bits >> 10) & 0x03) as u8)
}
#[doc = "Bits 12:13 - PL"]
#[inline(always)]
pub fn pl(&self) -> PL_R {
PL_R::new(((self.bits >> 12) & 0x03) as u8)
}
#[doc = "Bit 14 - MEM2MEM"]
#[inline(always)]
pub fn mem2mem(&self) -> MEM2MEM_R {
MEM2MEM_R::new(((self.bits >> 14) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - channel enable"]
#[inline(always)]
pub fn en(&mut self) -> EN_W {
EN_W { w: self }
}
#[doc = "Bit 1 - TCIE"]
#[inline(always)]
pub fn tcie(&mut self) -> TCIE_W {
TCIE_W { w: self }
}
#[doc = "Bit 2 - HTIE"]
#[inline(always)]
pub fn htie(&mut self) -> HTIE_W {
HTIE_W { w: self }
}
#[doc = "Bit 3 - TEIE"]
#[inline(always)]
pub fn teie(&mut self) -> TEIE_W {
TEIE_W { w: self }
}
#[doc = "Bit 4 - DIR"]
#[inline(always)]
pub fn dir(&mut self) -> DIR_W {
DIR_W { w: self }
}
#[doc = "Bit 5 - CIRC"]
#[inline(always)]
pub fn circ(&mut self) -> CIRC_W {
CIRC_W { w: self }
}
#[doc = "Bit 6 - PINC"]
#[inline(always)]
pub fn pinc(&mut self) -> PINC_W {
PINC_W { w: self }
}
#[doc = "Bit 7 - MINC"]
#[inline(always)]
pub fn minc(&mut self) -> MINC_W {
MINC_W { w: self }
}
#[doc = "Bits 8:9 - PSIZE"]
#[inline(always)]
pub fn psize(&mut self) -> PSIZE_W {
PSIZE_W { w: self }
}
#[doc = "Bits 10:11 - MSIZE"]
#[inline(always)]
pub fn msize(&mut self) -> MSIZE_W {
MSIZE_W { w: self }
}
#[doc = "Bits 12:13 - PL"]
#[inline(always)]
pub fn pl(&mut self) -> PL_W {
PL_W { w: self }
}
#[doc = "Bit 14 - MEM2MEM"]
#[inline(always)]
pub fn mem2mem(&mut self) -> MEM2MEM_W {
MEM2MEM_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "DMA channel 7 configuration register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ccr8](index.html) module"]
pub struct CCR8_SPEC;
impl crate::RegisterSpec for CCR8_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ccr8::R](R) reader structure"]
impl crate::Readable for CCR8_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ccr8::W](W) writer structure"]
impl crate::Writable for CCR8_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CCR8 to value 0"]
impl crate::Resettable for CCR8_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}