#[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::CFGR3 {
#[doc = r"Modifies the contents of the register"]
#[inline(always)]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
self.register.set(f(&R { bits }, &mut W { bits }).bits);
}
#[doc = r"Reads the contents of the register"]
#[inline(always)]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r"Writes to the register"]
#[inline(always)]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
self.register.set(
f(&mut W {
bits: Self::reset_value(),
})
.bits,
);
}
#[doc = r"Reset value of the register"]
#[inline(always)]
pub const fn reset_value() -> u32 {
0
}
#[doc = r"Writes the reset value to the register"]
#[inline(always)]
pub fn reset(&self) {
self.register.set(Self::reset_value())
}
}
#[doc = "Values that can be written to the field `REF_LOCK`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum REF_LOCKW {
#[doc = "SYSCFG_CFGR3\\[31:0\\] bits are read/write"]
READWRITE,
#[doc = "SYSCFG_CFGR3\\[31:0\\] bits are read-only"]
READONLY,
}
impl REF_LOCKW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
REF_LOCKW::READWRITE => false,
REF_LOCKW::READONLY => true,
}
}
}
#[doc = r"Proxy"]
pub struct _REF_LOCKW<'a> {
w: &'a mut W,
}
impl<'a> _REF_LOCKW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: REF_LOCKW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "SYSCFG_CFGR3\\[31:0\\] bits are read/write"]
#[inline(always)]
pub fn read_write(self) -> &'a mut W {
self.variant(REF_LOCKW::READWRITE)
}
#[doc = "SYSCFG_CFGR3\\[31:0\\] bits are read-only"]
#[inline(always)]
pub fn read_only(self) -> &'a mut W {
self.variant(REF_LOCKW::READONLY)
}
#[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 &= !(0x01 << 31);
self.w.bits |= ((value as u32) & 0x01) << 31;
self.w
}
}
#[doc = "Possible values of the field `VREFINT_RDYF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum VREFINT_RDYFR {
#[doc = "VREFINT OFF"]
NOTREADY,
#[doc = "VREFINT ready"]
READY,
}
impl VREFINT_RDYFR {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
VREFINT_RDYFR::NOTREADY => false,
VREFINT_RDYFR::READY => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> VREFINT_RDYFR {
match value {
false => VREFINT_RDYFR::NOTREADY,
true => VREFINT_RDYFR::READY,
}
}
#[doc = "Checks if the value of the field is `NOTREADY`"]
#[inline(always)]
pub fn is_not_ready(&self) -> bool {
*self == VREFINT_RDYFR::NOTREADY
}
#[doc = "Checks if the value of the field is `READY`"]
#[inline(always)]
pub fn is_ready(&self) -> bool {
*self == VREFINT_RDYFR::READY
}
}
#[doc = "Possible values of the field `ENBUF_SENSOR_ADC`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENBUF_SENSOR_ADCR {
#[doc = "Disables the buffer used to generate VREFINT reference for the temperature sensor"]
DISABLED,
#[doc = "Enables the buffer used to generate VREFINT reference for the temperature sensor"]
ENABLED,
}
impl ENBUF_SENSOR_ADCR {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
ENBUF_SENSOR_ADCR::DISABLED => false,
ENBUF_SENSOR_ADCR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> ENBUF_SENSOR_ADCR {
match value {
false => ENBUF_SENSOR_ADCR::DISABLED,
true => ENBUF_SENSOR_ADCR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENBUF_SENSOR_ADCR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENBUF_SENSOR_ADCR::ENABLED
}
}
#[doc = "Values that can be written to the field `ENBUF_SENSOR_ADC`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENBUF_SENSOR_ADCW {
#[doc = "Disables the buffer used to generate VREFINT reference for the temperature sensor"]
DISABLED,
#[doc = "Enables the buffer used to generate VREFINT reference for the temperature sensor"]
ENABLED,
}
impl ENBUF_SENSOR_ADCW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
ENBUF_SENSOR_ADCW::DISABLED => false,
ENBUF_SENSOR_ADCW::ENABLED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _ENBUF_SENSOR_ADCW<'a> {
w: &'a mut W,
}
impl<'a> _ENBUF_SENSOR_ADCW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ENBUF_SENSOR_ADCW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disables the buffer used to generate VREFINT reference for the temperature sensor"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENBUF_SENSOR_ADCW::DISABLED)
}
#[doc = "Enables the buffer used to generate VREFINT reference for the temperature sensor"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENBUF_SENSOR_ADCW::ENABLED)
}
#[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 &= !(0x01 << 9);
self.w.bits |= ((value as u32) & 0x01) << 9;
self.w
}
}
#[doc = "Possible values of the field `SEL_VREF_OUT`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SEL_VREF_OUTR {
#[doc = "no pad connected"]
NOCONNECTION,
#[doc = "PB0 connected"]
PB0,
#[doc = "PB1 connected"]
PB1,
#[doc = "PB0 and PB1 connected"]
BOTH,
}
impl SEL_VREF_OUTR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u8 {
match *self {
SEL_VREF_OUTR::NOCONNECTION => 0,
SEL_VREF_OUTR::PB0 => 0x01,
SEL_VREF_OUTR::PB1 => 0x02,
SEL_VREF_OUTR::BOTH => 0x03,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: u8) -> SEL_VREF_OUTR {
match value {
0 => SEL_VREF_OUTR::NOCONNECTION,
1 => SEL_VREF_OUTR::PB0,
2 => SEL_VREF_OUTR::PB1,
3 => SEL_VREF_OUTR::BOTH,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `NOCONNECTION`"]
#[inline(always)]
pub fn is_no_connection(&self) -> bool {
*self == SEL_VREF_OUTR::NOCONNECTION
}
#[doc = "Checks if the value of the field is `PB0`"]
#[inline(always)]
pub fn is_pb0(&self) -> bool {
*self == SEL_VREF_OUTR::PB0
}
#[doc = "Checks if the value of the field is `PB1`"]
#[inline(always)]
pub fn is_pb1(&self) -> bool {
*self == SEL_VREF_OUTR::PB1
}
#[doc = "Checks if the value of the field is `BOTH`"]
#[inline(always)]
pub fn is_both(&self) -> bool {
*self == SEL_VREF_OUTR::BOTH
}
}
#[doc = "Values that can be written to the field `SEL_VREF_OUT`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SEL_VREF_OUTW {
#[doc = "no pad connected"]
NOCONNECTION,
#[doc = "PB0 connected"]
PB0,
#[doc = "PB1 connected"]
PB1,
#[doc = "PB0 and PB1 connected"]
BOTH,
}
impl SEL_VREF_OUTW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> u8 {
match *self {
SEL_VREF_OUTW::NOCONNECTION => 0,
SEL_VREF_OUTW::PB0 => 1,
SEL_VREF_OUTW::PB1 => 2,
SEL_VREF_OUTW::BOTH => 3,
}
}
}
#[doc = r"Proxy"]
pub struct _SEL_VREF_OUTW<'a> {
w: &'a mut W,
}
impl<'a> _SEL_VREF_OUTW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SEL_VREF_OUTW) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "no pad connected"]
#[inline(always)]
pub fn no_connection(self) -> &'a mut W {
self.variant(SEL_VREF_OUTW::NOCONNECTION)
}
#[doc = "PB0 connected"]
#[inline(always)]
pub fn pb0(self) -> &'a mut W {
self.variant(SEL_VREF_OUTW::PB0)
}
#[doc = "PB1 connected"]
#[inline(always)]
pub fn pb1(self) -> &'a mut W {
self.variant(SEL_VREF_OUTW::PB1)
}
#[doc = "PB0 and PB1 connected"]
#[inline(always)]
pub fn both(self) -> &'a mut W {
self.variant(SEL_VREF_OUTW::BOTH)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 4);
self.w.bits |= ((value as u32) & 0x03) << 4;
self.w
}
}
#[doc = "Possible values of the field `ENBUF_VREFINT_COMP2`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENBUF_VREFINT_COMP2R {
#[doc = "Disables the buffer used to generate VREFINT references for COMP2"]
DISABLED,
#[doc = "Enables the buffer used to generate VREFINT references for COMP2"]
ENABLED,
}
impl ENBUF_VREFINT_COMP2R {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
ENBUF_VREFINT_COMP2R::DISABLED => false,
ENBUF_VREFINT_COMP2R::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> ENBUF_VREFINT_COMP2R {
match value {
false => ENBUF_VREFINT_COMP2R::DISABLED,
true => ENBUF_VREFINT_COMP2R::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENBUF_VREFINT_COMP2R::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENBUF_VREFINT_COMP2R::ENABLED
}
}
#[doc = "Values that can be written to the field `ENBUF_VREFINT_COMP2`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENBUF_VREFINT_COMP2W {
#[doc = "Disables the buffer used to generate VREFINT references for COMP2"]
DISABLED,
#[doc = "Enables the buffer used to generate VREFINT references for COMP2"]
ENABLED,
}
impl ENBUF_VREFINT_COMP2W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
ENBUF_VREFINT_COMP2W::DISABLED => false,
ENBUF_VREFINT_COMP2W::ENABLED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _ENBUF_VREFINT_COMP2W<'a> {
w: &'a mut W,
}
impl<'a> _ENBUF_VREFINT_COMP2W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ENBUF_VREFINT_COMP2W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disables the buffer used to generate VREFINT references for COMP2"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENBUF_VREFINT_COMP2W::DISABLED)
}
#[doc = "Enables the buffer used to generate VREFINT references for COMP2"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENBUF_VREFINT_COMP2W::ENABLED)
}
#[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 &= !(0x01 << 12);
self.w.bits |= ((value as u32) & 0x01) << 12;
self.w
}
}
#[doc = "Possible values of the field `ENBUF_VREFINT_ADC`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENBUF_VREFINT_ADCR {
#[doc = "Disables the buffer used to generate VREFINT reference for the ADC"]
DISABLED,
#[doc = "Enables the buffer used to generate VREFINT reference for the ADC"]
ENABLED,
}
impl ENBUF_VREFINT_ADCR {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
ENBUF_VREFINT_ADCR::DISABLED => false,
ENBUF_VREFINT_ADCR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> ENBUF_VREFINT_ADCR {
match value {
false => ENBUF_VREFINT_ADCR::DISABLED,
true => ENBUF_VREFINT_ADCR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENBUF_VREFINT_ADCR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENBUF_VREFINT_ADCR::ENABLED
}
}
#[doc = "Values that can be written to the field `ENBUF_VREFINT_ADC`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENBUF_VREFINT_ADCW {
#[doc = "Disables the buffer used to generate VREFINT reference for the ADC"]
DISABLED,
#[doc = "Enables the buffer used to generate VREFINT reference for the ADC"]
ENABLED,
}
impl ENBUF_VREFINT_ADCW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
ENBUF_VREFINT_ADCW::DISABLED => false,
ENBUF_VREFINT_ADCW::ENABLED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _ENBUF_VREFINT_ADCW<'a> {
w: &'a mut W,
}
impl<'a> _ENBUF_VREFINT_ADCW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ENBUF_VREFINT_ADCW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disables the buffer used to generate VREFINT reference for the ADC"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENBUF_VREFINT_ADCW::DISABLED)
}
#[doc = "Enables the buffer used to generate VREFINT reference for the ADC"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENBUF_VREFINT_ADCW::ENABLED)
}
#[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 &= !(0x01 << 8);
self.w.bits |= ((value as u32) & 0x01) << 8;
self.w
}
}
#[doc = "Possible values of the field `EN_VREFINT`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_VREFINTR {
#[doc = "VREFINT voltage disabled in low-power mode (if ULP=1) and scaler for COMP2 disabled"]
DISABLED,
#[doc = "VREFINT voltage enabled in low-power mode and scaler for COMP2 enabled"]
ENABLED,
}
impl EN_VREFINTR {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
EN_VREFINTR::DISABLED => false,
EN_VREFINTR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> EN_VREFINTR {
match value {
false => EN_VREFINTR::DISABLED,
true => EN_VREFINTR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_VREFINTR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_VREFINTR::ENABLED
}
}
#[doc = "Values that can be written to the field `EN_VREFINT`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_VREFINTW {
#[doc = "VREFINT voltage disabled in low-power mode (if ULP=1) and scaler for COMP2 disabled"]
DISABLED,
#[doc = "VREFINT voltage enabled in low-power mode and scaler for COMP2 enabled"]
ENABLED,
}
impl EN_VREFINTW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
EN_VREFINTW::DISABLED => false,
EN_VREFINTW::ENABLED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _EN_VREFINTW<'a> {
w: &'a mut W,
}
impl<'a> _EN_VREFINTW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: EN_VREFINTW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "VREFINT voltage disabled in low-power mode (if ULP=1) and scaler for COMP2 disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_VREFINTW::DISABLED)
}
#[doc = "VREFINT voltage enabled in low-power mode and scaler for COMP2 enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_VREFINTW::ENABLED)
}
#[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 &= !(0x01 << 0);
self.w.bits |= ((value as u32) & 0x01) << 0;
self.w
}
}
impl R {
#[doc = r"Value of the register as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bit 30 - VREFINT ready flag"]
#[inline(always)]
pub fn vrefint_rdyf(&self) -> VREFINT_RDYFR {
VREFINT_RDYFR::_from(((self.bits >> 30) & 0x01) != 0)
}
#[doc = "Bit 9 - Sensor reference for ADC enable bit"]
#[inline(always)]
pub fn enbuf_sensor_adc(&self) -> ENBUF_SENSOR_ADCR {
ENBUF_SENSOR_ADCR::_from(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bits 4:5 - BGAP_ADC connection bit"]
#[inline(always)]
pub fn sel_vref_out(&self) -> SEL_VREF_OUTR {
SEL_VREF_OUTR::_from(((self.bits >> 4) & 0x03) as u8)
}
#[doc = "Bit 12 - VREFINT reference for COMP2 scaler enable bit"]
#[inline(always)]
pub fn enbuf_vrefint_comp2(&self) -> ENBUF_VREFINT_COMP2R {
ENBUF_VREFINT_COMP2R::_from(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 8 - VREFINT reference for ADC enable bit"]
#[inline(always)]
pub fn enbuf_vrefint_adc(&self) -> ENBUF_VREFINT_ADCR {
ENBUF_VREFINT_ADCR::_from(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 0 - VREFINT enable and scaler control for COMP2 enable bit"]
#[inline(always)]
pub fn en_vrefint(&self) -> EN_VREFINTR {
EN_VREFINTR::_from(((self.bits >> 0) & 0x01) != 0)
}
}
impl W {
#[doc = r"Writes raw bits to the register"]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bit 31 - REF_CTRL lock bit"]
#[inline(always)]
pub fn ref_lock(&mut self) -> _REF_LOCKW {
_REF_LOCKW { w: self }
}
#[doc = "Bit 9 - Sensor reference for ADC enable bit"]
#[inline(always)]
pub fn enbuf_sensor_adc(&mut self) -> _ENBUF_SENSOR_ADCW {
_ENBUF_SENSOR_ADCW { w: self }
}
#[doc = "Bits 4:5 - BGAP_ADC connection bit"]
#[inline(always)]
pub fn sel_vref_out(&mut self) -> _SEL_VREF_OUTW {
_SEL_VREF_OUTW { w: self }
}
#[doc = "Bit 12 - VREFINT reference for COMP2 scaler enable bit"]
#[inline(always)]
pub fn enbuf_vrefint_comp2(&mut self) -> _ENBUF_VREFINT_COMP2W {
_ENBUF_VREFINT_COMP2W { w: self }
}
#[doc = "Bit 8 - VREFINT reference for ADC enable bit"]
#[inline(always)]
pub fn enbuf_vrefint_adc(&mut self) -> _ENBUF_VREFINT_ADCW {
_ENBUF_VREFINT_ADCW { w: self }
}
#[doc = "Bit 0 - VREFINT enable and scaler control for COMP2 enable bit"]
#[inline(always)]
pub fn en_vrefint(&mut self) -> _EN_VREFINTW {
_EN_VREFINTW { w: self }
}
}