pub type R = crate::R<GPDRrs>;
pub type W = crate::W<GPDRrs>;
pub type DATA1_R = crate::FieldReader;
pub type DATA1_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type DATA2_R = crate::FieldReader;
pub type DATA2_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type DATA3_R = crate::FieldReader;
pub type DATA3_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type DATA4_R = crate::FieldReader;
pub type DATA4_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn data1(&self) -> DATA1_R {
DATA1_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn data2(&self) -> DATA2_R {
DATA2_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn data3(&self) -> DATA3_R {
DATA3_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn data4(&self) -> DATA4_R {
DATA4_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GPDR")
.field("data1", &self.data1())
.field("data2", &self.data2())
.field("data3", &self.data3())
.field("data4", &self.data4())
.finish()
}
}
impl W {
#[inline(always)]
pub fn data1(&mut self) -> DATA1_W<GPDRrs> {
DATA1_W::new(self, 0)
}
#[inline(always)]
pub fn data2(&mut self) -> DATA2_W<GPDRrs> {
DATA2_W::new(self, 8)
}
#[inline(always)]
pub fn data3(&mut self) -> DATA3_W<GPDRrs> {
DATA3_W::new(self, 16)
}
#[inline(always)]
pub fn data4(&mut self) -> DATA4_W<GPDRrs> {
DATA4_W::new(self, 24)
}
}
pub struct GPDRrs;
impl crate::RegisterSpec for GPDRrs {
type Ux = u32;
}
impl crate::Readable for GPDRrs {}
impl crate::Writable for GPDRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for GPDRrs {}