#[doc = "Register `INT_RAW` reader"]
pub struct R(crate::R<INT_RAW_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<INT_RAW_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::convert::From<crate::R<INT_RAW_SPEC>> for R {
fn from(reader: crate::R<INT_RAW_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `INT_RAW` writer"]
pub struct W(crate::W<INT_RAW_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<INT_RAW_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 core::convert::From<crate::W<INT_RAW_SPEC>> for W {
fn from(writer: crate::W<INT_RAW_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TIME_OUT_INT_RAW` reader - "]
pub struct TIME_OUT_INT_RAW_R(crate::FieldReader<bool, bool>);
impl TIME_OUT_INT_RAW_R {
pub(crate) fn new(bits: bool) -> Self {
TIME_OUT_INT_RAW_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TIME_OUT_INT_RAW_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TIME_OUT_INT_RAW` writer - "]
pub struct TIME_OUT_INT_RAW_W<'a> {
w: &'a mut W,
}
impl<'a> TIME_OUT_INT_RAW_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 `TRANS_COMPLETE_INT_RAW` reader - "]
pub struct TRANS_COMPLETE_INT_RAW_R(crate::FieldReader<bool, bool>);
impl TRANS_COMPLETE_INT_RAW_R {
pub(crate) fn new(bits: bool) -> Self {
TRANS_COMPLETE_INT_RAW_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TRANS_COMPLETE_INT_RAW_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TRANS_COMPLETE_INT_RAW` writer - "]
pub struct TRANS_COMPLETE_INT_RAW_W<'a> {
w: &'a mut W,
}
impl<'a> TRANS_COMPLETE_INT_RAW_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 `MASTER_TRANS_COMPLETE_INT_RAW` reader - "]
pub struct MASTER_TRANS_COMPLETE_INT_RAW_R(crate::FieldReader<bool, bool>);
impl MASTER_TRANS_COMPLETE_INT_RAW_R {
pub(crate) fn new(bits: bool) -> Self {
MASTER_TRANS_COMPLETE_INT_RAW_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for MASTER_TRANS_COMPLETE_INT_RAW_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `MASTER_TRANS_COMPLETE_INT_RAW` writer - "]
pub struct MASTER_TRANS_COMPLETE_INT_RAW_W<'a> {
w: &'a mut W,
}
impl<'a> MASTER_TRANS_COMPLETE_INT_RAW_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 `ARBITRATION_LOST_INT_RAW` reader - "]
pub struct ARBITRATION_LOST_INT_RAW_R(crate::FieldReader<bool, bool>);
impl ARBITRATION_LOST_INT_RAW_R {
pub(crate) fn new(bits: bool) -> Self {
ARBITRATION_LOST_INT_RAW_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for ARBITRATION_LOST_INT_RAW_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ARBITRATION_LOST_INT_RAW` writer - "]
pub struct ARBITRATION_LOST_INT_RAW_W<'a> {
w: &'a mut W,
}
impl<'a> ARBITRATION_LOST_INT_RAW_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 `SLAVE_TRANS_COMPLETE_INT_RAW` reader - "]
pub struct SLAVE_TRANS_COMPLETE_INT_RAW_R(crate::FieldReader<bool, bool>);
impl SLAVE_TRANS_COMPLETE_INT_RAW_R {
pub(crate) fn new(bits: bool) -> Self {
SLAVE_TRANS_COMPLETE_INT_RAW_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for SLAVE_TRANS_COMPLETE_INT_RAW_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `SLAVE_TRANS_COMPLETE_INT_RAW` writer - "]
pub struct SLAVE_TRANS_COMPLETE_INT_RAW_W<'a> {
w: &'a mut W,
}
impl<'a> SLAVE_TRANS_COMPLETE_INT_RAW_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
}
}
impl R {
#[doc = "Bit 7"]
#[inline(always)]
pub fn time_out_int_raw(&self) -> TIME_OUT_INT_RAW_R {
TIME_OUT_INT_RAW_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 6"]
#[inline(always)]
pub fn trans_complete_int_raw(&self) -> TRANS_COMPLETE_INT_RAW_R {
TRANS_COMPLETE_INT_RAW_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5"]
#[inline(always)]
pub fn master_trans_complete_int_raw(&self) -> MASTER_TRANS_COMPLETE_INT_RAW_R {
MASTER_TRANS_COMPLETE_INT_RAW_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4"]
#[inline(always)]
pub fn arbitration_lost_int_raw(&self) -> ARBITRATION_LOST_INT_RAW_R {
ARBITRATION_LOST_INT_RAW_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3"]
#[inline(always)]
pub fn slave_trans_complete_int_raw(&self) -> SLAVE_TRANS_COMPLETE_INT_RAW_R {
SLAVE_TRANS_COMPLETE_INT_RAW_R::new(((self.bits >> 3) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 7"]
#[inline(always)]
pub fn time_out_int_raw(&mut self) -> TIME_OUT_INT_RAW_W {
TIME_OUT_INT_RAW_W { w: self }
}
#[doc = "Bit 6"]
#[inline(always)]
pub fn trans_complete_int_raw(&mut self) -> TRANS_COMPLETE_INT_RAW_W {
TRANS_COMPLETE_INT_RAW_W { w: self }
}
#[doc = "Bit 5"]
#[inline(always)]
pub fn master_trans_complete_int_raw(&mut self) -> MASTER_TRANS_COMPLETE_INT_RAW_W {
MASTER_TRANS_COMPLETE_INT_RAW_W { w: self }
}
#[doc = "Bit 4"]
#[inline(always)]
pub fn arbitration_lost_int_raw(&mut self) -> ARBITRATION_LOST_INT_RAW_W {
ARBITRATION_LOST_INT_RAW_W { w: self }
}
#[doc = "Bit 3"]
#[inline(always)]
pub fn slave_trans_complete_int_raw(&mut self) -> SLAVE_TRANS_COMPLETE_INT_RAW_W {
SLAVE_TRANS_COMPLETE_INT_RAW_W { w: self }
}
#[doc = "Writes raw bits to the register."]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "RTC_I2C_INT_RAW\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 [int_raw](index.html) module"]
pub struct INT_RAW_SPEC;
impl crate::RegisterSpec for INT_RAW_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [int_raw::R](R) reader structure"]
impl crate::Readable for INT_RAW_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [int_raw::W](W) writer structure"]
impl crate::Writable for INT_RAW_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets INT_RAW to value 0"]
impl crate::Resettable for INT_RAW_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}