#[doc = "Reader of register CONF"]
pub type R = crate::R<u32, super::CONF>;
#[doc = "Writer for register CONF"]
pub type W = crate::W<u32, super::CONF>;
#[doc = "Register CONF `reset()`'s with value 0"]
impl crate::ResetValue for super::CONF {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `SIG_LOOPBACK`"]
pub type SIG_LOOPBACK_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `SIG_LOOPBACK`"]
pub struct SIG_LOOPBACK_W<'a> {
w: &'a mut W,
}
impl<'a> SIG_LOOPBACK_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 << 18)) | (((value as u32) & 0x01) << 18);
self.w
}
}
#[doc = "Reader of field `RX_MSB_RIGHT`"]
pub type RX_MSB_RIGHT_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `RX_MSB_RIGHT`"]
pub struct RX_MSB_RIGHT_W<'a> {
w: &'a mut W,
}
impl<'a> RX_MSB_RIGHT_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 << 17)) | (((value as u32) & 0x01) << 17);
self.w
}
}
#[doc = "Reader of field `TX_MSB_RIGHT`"]
pub type TX_MSB_RIGHT_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TX_MSB_RIGHT`"]
pub struct TX_MSB_RIGHT_W<'a> {
w: &'a mut W,
}
impl<'a> TX_MSB_RIGHT_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 << 16)) | (((value as u32) & 0x01) << 16);
self.w
}
}
#[doc = "Reader of field `RX_MONO`"]
pub type RX_MONO_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `RX_MONO`"]
pub struct RX_MONO_W<'a> {
w: &'a mut W,
}
impl<'a> RX_MONO_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 << 15)) | (((value as u32) & 0x01) << 15);
self.w
}
}
#[doc = "Reader of field `TX_MONO`"]
pub type TX_MONO_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TX_MONO`"]
pub struct TX_MONO_W<'a> {
w: &'a mut W,
}
impl<'a> TX_MONO_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
}
}
#[doc = "Reader of field `RX_SHORT_SYNC`"]
pub type RX_SHORT_SYNC_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `RX_SHORT_SYNC`"]
pub struct RX_SHORT_SYNC_W<'a> {
w: &'a mut W,
}
impl<'a> RX_SHORT_SYNC_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 << 13)) | (((value as u32) & 0x01) << 13);
self.w
}
}
#[doc = "Reader of field `TX_SHORT_SYNC`"]
pub type TX_SHORT_SYNC_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TX_SHORT_SYNC`"]
pub struct TX_SHORT_SYNC_W<'a> {
w: &'a mut W,
}
impl<'a> TX_SHORT_SYNC_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 << 12)) | (((value as u32) & 0x01) << 12);
self.w
}
}
#[doc = "Reader of field `RX_MSB_SHIFT`"]
pub type RX_MSB_SHIFT_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `RX_MSB_SHIFT`"]
pub struct RX_MSB_SHIFT_W<'a> {
w: &'a mut W,
}
impl<'a> RX_MSB_SHIFT_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 << 11)) | (((value as u32) & 0x01) << 11);
self.w
}
}
#[doc = "Reader of field `TX_MSB_SHIFT`"]
pub type TX_MSB_SHIFT_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TX_MSB_SHIFT`"]
pub struct TX_MSB_SHIFT_W<'a> {
w: &'a mut W,
}
impl<'a> TX_MSB_SHIFT_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 << 10)) | (((value as u32) & 0x01) << 10);
self.w
}
}
#[doc = "Reader of field `RX_RIGHT_FIRST`"]
pub type RX_RIGHT_FIRST_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `RX_RIGHT_FIRST`"]
pub struct RX_RIGHT_FIRST_W<'a> {
w: &'a mut W,
}
impl<'a> RX_RIGHT_FIRST_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 << 9)) | (((value as u32) & 0x01) << 9);
self.w
}
}
#[doc = "Reader of field `TX_RIGHT_FIRST`"]
pub type TX_RIGHT_FIRST_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TX_RIGHT_FIRST`"]
pub struct TX_RIGHT_FIRST_W<'a> {
w: &'a mut W,
}
impl<'a> TX_RIGHT_FIRST_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 << 8)) | (((value as u32) & 0x01) << 8);
self.w
}
}
#[doc = "Reader of field `RX_SLAVE_MOD`"]
pub type RX_SLAVE_MOD_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `RX_SLAVE_MOD`"]
pub struct RX_SLAVE_MOD_W<'a> {
w: &'a mut W,
}
impl<'a> RX_SLAVE_MOD_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 = "Reader of field `TX_SLAVE_MOD`"]
pub type TX_SLAVE_MOD_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TX_SLAVE_MOD`"]
pub struct TX_SLAVE_MOD_W<'a> {
w: &'a mut W,
}
impl<'a> TX_SLAVE_MOD_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 = "Reader of field `RX_START`"]
pub type RX_START_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `RX_START`"]
pub struct RX_START_W<'a> {
w: &'a mut W,
}
impl<'a> RX_START_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 = "Reader of field `TX_START`"]
pub type TX_START_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TX_START`"]
pub struct TX_START_W<'a> {
w: &'a mut W,
}
impl<'a> TX_START_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 = "Reader of field `RX_FIFO_RESET`"]
pub type RX_FIFO_RESET_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `RX_FIFO_RESET`"]
pub struct RX_FIFO_RESET_W<'a> {
w: &'a mut W,
}
impl<'a> RX_FIFO_RESET_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 = "Reader of field `TX_FIFO_RESET`"]
pub type TX_FIFO_RESET_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TX_FIFO_RESET`"]
pub struct TX_FIFO_RESET_W<'a> {
w: &'a mut W,
}
impl<'a> TX_FIFO_RESET_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 = "Reader of field `RX_RESET`"]
pub type RX_RESET_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `RX_RESET`"]
pub struct RX_RESET_W<'a> {
w: &'a mut W,
}
impl<'a> RX_RESET_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 = "Reader of field `TX_RESET`"]
pub type TX_RESET_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TX_RESET`"]
pub struct TX_RESET_W<'a> {
w: &'a mut W,
}
impl<'a> TX_RESET_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
}
}
impl R {
#[doc = "Bit 18"]
#[inline(always)]
pub fn sig_loopback(&self) -> SIG_LOOPBACK_R {
SIG_LOOPBACK_R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 17"]
#[inline(always)]
pub fn rx_msb_right(&self) -> RX_MSB_RIGHT_R {
RX_MSB_RIGHT_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 16"]
#[inline(always)]
pub fn tx_msb_right(&self) -> TX_MSB_RIGHT_R {
TX_MSB_RIGHT_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 15"]
#[inline(always)]
pub fn rx_mono(&self) -> RX_MONO_R {
RX_MONO_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 14"]
#[inline(always)]
pub fn tx_mono(&self) -> TX_MONO_R {
TX_MONO_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 13"]
#[inline(always)]
pub fn rx_short_sync(&self) -> RX_SHORT_SYNC_R {
RX_SHORT_SYNC_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 12"]
#[inline(always)]
pub fn tx_short_sync(&self) -> TX_SHORT_SYNC_R {
TX_SHORT_SYNC_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 11"]
#[inline(always)]
pub fn rx_msb_shift(&self) -> RX_MSB_SHIFT_R {
RX_MSB_SHIFT_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 10"]
#[inline(always)]
pub fn tx_msb_shift(&self) -> TX_MSB_SHIFT_R {
TX_MSB_SHIFT_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 9"]
#[inline(always)]
pub fn rx_right_first(&self) -> RX_RIGHT_FIRST_R {
RX_RIGHT_FIRST_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 8"]
#[inline(always)]
pub fn tx_right_first(&self) -> TX_RIGHT_FIRST_R {
TX_RIGHT_FIRST_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 7"]
#[inline(always)]
pub fn rx_slave_mod(&self) -> RX_SLAVE_MOD_R {
RX_SLAVE_MOD_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 6"]
#[inline(always)]
pub fn tx_slave_mod(&self) -> TX_SLAVE_MOD_R {
TX_SLAVE_MOD_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5"]
#[inline(always)]
pub fn rx_start(&self) -> RX_START_R {
RX_START_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4"]
#[inline(always)]
pub fn tx_start(&self) -> TX_START_R {
TX_START_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3"]
#[inline(always)]
pub fn rx_fifo_reset(&self) -> RX_FIFO_RESET_R {
RX_FIFO_RESET_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2"]
#[inline(always)]
pub fn tx_fifo_reset(&self) -> TX_FIFO_RESET_R {
TX_FIFO_RESET_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1"]
#[inline(always)]
pub fn rx_reset(&self) -> RX_RESET_R {
RX_RESET_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0"]
#[inline(always)]
pub fn tx_reset(&self) -> TX_RESET_R {
TX_RESET_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 18"]
#[inline(always)]
pub fn sig_loopback(&mut self) -> SIG_LOOPBACK_W {
SIG_LOOPBACK_W { w: self }
}
#[doc = "Bit 17"]
#[inline(always)]
pub fn rx_msb_right(&mut self) -> RX_MSB_RIGHT_W {
RX_MSB_RIGHT_W { w: self }
}
#[doc = "Bit 16"]
#[inline(always)]
pub fn tx_msb_right(&mut self) -> TX_MSB_RIGHT_W {
TX_MSB_RIGHT_W { w: self }
}
#[doc = "Bit 15"]
#[inline(always)]
pub fn rx_mono(&mut self) -> RX_MONO_W {
RX_MONO_W { w: self }
}
#[doc = "Bit 14"]
#[inline(always)]
pub fn tx_mono(&mut self) -> TX_MONO_W {
TX_MONO_W { w: self }
}
#[doc = "Bit 13"]
#[inline(always)]
pub fn rx_short_sync(&mut self) -> RX_SHORT_SYNC_W {
RX_SHORT_SYNC_W { w: self }
}
#[doc = "Bit 12"]
#[inline(always)]
pub fn tx_short_sync(&mut self) -> TX_SHORT_SYNC_W {
TX_SHORT_SYNC_W { w: self }
}
#[doc = "Bit 11"]
#[inline(always)]
pub fn rx_msb_shift(&mut self) -> RX_MSB_SHIFT_W {
RX_MSB_SHIFT_W { w: self }
}
#[doc = "Bit 10"]
#[inline(always)]
pub fn tx_msb_shift(&mut self) -> TX_MSB_SHIFT_W {
TX_MSB_SHIFT_W { w: self }
}
#[doc = "Bit 9"]
#[inline(always)]
pub fn rx_right_first(&mut self) -> RX_RIGHT_FIRST_W {
RX_RIGHT_FIRST_W { w: self }
}
#[doc = "Bit 8"]
#[inline(always)]
pub fn tx_right_first(&mut self) -> TX_RIGHT_FIRST_W {
TX_RIGHT_FIRST_W { w: self }
}
#[doc = "Bit 7"]
#[inline(always)]
pub fn rx_slave_mod(&mut self) -> RX_SLAVE_MOD_W {
RX_SLAVE_MOD_W { w: self }
}
#[doc = "Bit 6"]
#[inline(always)]
pub fn tx_slave_mod(&mut self) -> TX_SLAVE_MOD_W {
TX_SLAVE_MOD_W { w: self }
}
#[doc = "Bit 5"]
#[inline(always)]
pub fn rx_start(&mut self) -> RX_START_W {
RX_START_W { w: self }
}
#[doc = "Bit 4"]
#[inline(always)]
pub fn tx_start(&mut self) -> TX_START_W {
TX_START_W { w: self }
}
#[doc = "Bit 3"]
#[inline(always)]
pub fn rx_fifo_reset(&mut self) -> RX_FIFO_RESET_W {
RX_FIFO_RESET_W { w: self }
}
#[doc = "Bit 2"]
#[inline(always)]
pub fn tx_fifo_reset(&mut self) -> TX_FIFO_RESET_W {
TX_FIFO_RESET_W { w: self }
}
#[doc = "Bit 1"]
#[inline(always)]
pub fn rx_reset(&mut self) -> RX_RESET_W {
RX_RESET_W { w: self }
}
#[doc = "Bit 0"]
#[inline(always)]
pub fn tx_reset(&mut self) -> TX_RESET_W {
TX_RESET_W { w: self }
}
}