#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r" Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::AMPCOMP_CTRL1 {
#[doc = r" Modifies the contents of the register"]
#[inline]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.set(w.bits);
}
#[doc = r" Reads the contents of the register"]
#[inline]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r" Writes to the register"]
#[inline]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
let mut w = W::reset_value();
f(&mut w);
self.register.set(w.bits);
}
#[doc = r" Writes the reset value to the register"]
#[inline]
pub fn reset(&self) {
self.write(|w| w)
}
}
#[doc = r" Value of the field"]
pub struct RESERVED1R {
bits: bool,
}
impl RESERVED1R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct AMPCOMP_REQ_MODER {
bits: bool,
}
impl AMPCOMP_REQ_MODER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct RESERVED0R {
bits: u8,
}
impl RESERVED0R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct IBIAS_OFFSETR {
bits: u8,
}
impl IBIAS_OFFSETR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct IBIAS_INITR {
bits: u8,
}
impl IBIAS_INITR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct LPM_IBIAS_WAIT_CNT_FINALR {
bits: u8,
}
impl LPM_IBIAS_WAIT_CNT_FINALR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct CAP_STEPR {
bits: u8,
}
impl CAP_STEPR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct IBIASCAP_HPTOLP_OL_CNTR {
bits: u8,
}
impl IBIASCAP_HPTOLP_OL_CNTR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Proxy"]
pub struct _RESERVED1W<'a> {
w: &'a mut W,
}
impl<'a> _RESERVED1W<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 31;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _AMPCOMP_REQ_MODEW<'a> {
w: &'a mut W,
}
impl<'a> _AMPCOMP_REQ_MODEW<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 30;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _RESERVED0W<'a> {
w: &'a mut W,
}
impl<'a> _RESERVED0W<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 63;
const OFFSET: u8 = 24;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _IBIAS_OFFSETW<'a> {
w: &'a mut W,
}
impl<'a> _IBIAS_OFFSETW<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 20;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _IBIAS_INITW<'a> {
w: &'a mut W,
}
impl<'a> _IBIAS_INITW<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 16;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _LPM_IBIAS_WAIT_CNT_FINALW<'a> {
w: &'a mut W,
}
impl<'a> _LPM_IBIAS_WAIT_CNT_FINALW<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 255;
const OFFSET: u8 = 8;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _CAP_STEPW<'a> {
w: &'a mut W,
}
impl<'a> _CAP_STEPW<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 4;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _IBIASCAP_HPTOLP_OL_CNTW<'a> {
w: &'a mut W,
}
impl<'a> _IBIASCAP_HPTOLP_OL_CNTW<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 0;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bit 31 - 31:31\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn reserved1(&self) -> RESERVED1R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 31;
((self.bits >> OFFSET) & MASK as u32) != 0
};
RESERVED1R { bits }
}
#[doc = "Bit 30 - 30:30\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn ampcomp_req_mode(&self) -> AMPCOMP_REQ_MODER {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 30;
((self.bits >> OFFSET) & MASK as u32) != 0
};
AMPCOMP_REQ_MODER { bits }
}
#[doc = "Bits 24:29 - 29:24\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn reserved0(&self) -> RESERVED0R {
let bits = {
const MASK: u8 = 63;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) as u8
};
RESERVED0R { bits }
}
#[doc = "Bits 20:23 - 23:20\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn ibias_offset(&self) -> IBIAS_OFFSETR {
let bits = {
const MASK: u8 = 15;
const OFFSET: u8 = 20;
((self.bits >> OFFSET) & MASK as u32) as u8
};
IBIAS_OFFSETR { bits }
}
#[doc = "Bits 16:19 - 19:16\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn ibias_init(&self) -> IBIAS_INITR {
let bits = {
const MASK: u8 = 15;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u8
};
IBIAS_INITR { bits }
}
#[doc = "Bits 8:15 - 15:8\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn lpm_ibias_wait_cnt_final(&self) -> LPM_IBIAS_WAIT_CNT_FINALR {
let bits = {
const MASK: u8 = 255;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
};
LPM_IBIAS_WAIT_CNT_FINALR { bits }
}
#[doc = "Bits 4:7 - 7:4\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn cap_step(&self) -> CAP_STEPR {
let bits = {
const MASK: u8 = 15;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) as u8
};
CAP_STEPR { bits }
}
#[doc = "Bits 0:3 - 3:0\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn ibiascap_hptolp_ol_cnt(&self) -> IBIASCAP_HPTOLP_OL_CNTR {
let bits = {
const MASK: u8 = 15;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
};
IBIASCAP_HPTOLP_OL_CNTR { bits }
}
}
impl W {
#[doc = r" Reset value of the register"]
#[inline]
pub fn reset_value() -> W {
W { bits: 4282924871 }
}
#[doc = r" Writes raw bits to the register"]
#[inline]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bit 31 - 31:31\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn reserved1(&mut self) -> _RESERVED1W {
_RESERVED1W { w: self }
}
#[doc = "Bit 30 - 30:30\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn ampcomp_req_mode(&mut self) -> _AMPCOMP_REQ_MODEW {
_AMPCOMP_REQ_MODEW { w: self }
}
#[doc = "Bits 24:29 - 29:24\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn reserved0(&mut self) -> _RESERVED0W {
_RESERVED0W { w: self }
}
#[doc = "Bits 20:23 - 23:20\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn ibias_offset(&mut self) -> _IBIAS_OFFSETW {
_IBIAS_OFFSETW { w: self }
}
#[doc = "Bits 16:19 - 19:16\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn ibias_init(&mut self) -> _IBIAS_INITW {
_IBIAS_INITW { w: self }
}
#[doc = "Bits 8:15 - 15:8\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn lpm_ibias_wait_cnt_final(&mut self) -> _LPM_IBIAS_WAIT_CNT_FINALW {
_LPM_IBIAS_WAIT_CNT_FINALW { w: self }
}
#[doc = "Bits 4:7 - 7:4\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn cap_step(&mut self) -> _CAP_STEPW {
_CAP_STEPW { w: self }
}
#[doc = "Bits 0:3 - 3:0\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn ibiascap_hptolp_ol_cnt(&mut self) -> _IBIASCAP_HPTOLP_OL_CNTW {
_IBIASCAP_HPTOLP_OL_CNTW { w: self }
}
}