#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
impl super::GSTAT {
#[doc = r" Reads the contents of the register"]
#[inline]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
}
#[doc = "Possible values of the field `S0I`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum S0IR {
#[doc = "Running"]
VALUE1,
#[doc = "Idle"]
VALUE2,
}
impl S0IR {
#[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 as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
S0IR::VALUE1 => false,
S0IR::VALUE2 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> S0IR {
match value {
false => S0IR::VALUE1,
true => S0IR::VALUE2,
}
}
#[doc = "Checks if the value of the field is `VALUE1`"]
#[inline]
pub fn is_value1(&self) -> bool {
*self == S0IR::VALUE1
}
#[doc = "Checks if the value of the field is `VALUE2`"]
#[inline]
pub fn is_value2(&self) -> bool {
*self == S0IR::VALUE2
}
}
#[doc = "Possible values of the field `S1I`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum S1IR {
#[doc = "Running"]
VALUE1,
#[doc = "Idle"]
VALUE2,
}
impl S1IR {
#[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 as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
S1IR::VALUE1 => false,
S1IR::VALUE2 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> S1IR {
match value {
false => S1IR::VALUE1,
true => S1IR::VALUE2,
}
}
#[doc = "Checks if the value of the field is `VALUE1`"]
#[inline]
pub fn is_value1(&self) -> bool {
*self == S1IR::VALUE1
}
#[doc = "Checks if the value of the field is `VALUE2`"]
#[inline]
pub fn is_value2(&self) -> bool {
*self == S1IR::VALUE2
}
}
#[doc = "Possible values of the field `S2I`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum S2IR {
#[doc = "Running"]
VALUE1,
#[doc = "Idle"]
VALUE2,
}
impl S2IR {
#[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 as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
S2IR::VALUE1 => false,
S2IR::VALUE2 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> S2IR {
match value {
false => S2IR::VALUE1,
true => S2IR::VALUE2,
}
}
#[doc = "Checks if the value of the field is `VALUE1`"]
#[inline]
pub fn is_value1(&self) -> bool {
*self == S2IR::VALUE1
}
#[doc = "Checks if the value of the field is `VALUE2`"]
#[inline]
pub fn is_value2(&self) -> bool {
*self == S2IR::VALUE2
}
}
#[doc = "Possible values of the field `S3I`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum S3IR {
#[doc = "Running"]
VALUE1,
#[doc = "Idle"]
VALUE2,
}
impl S3IR {
#[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 as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
S3IR::VALUE1 => false,
S3IR::VALUE2 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> S3IR {
match value {
false => S3IR::VALUE1,
true => S3IR::VALUE2,
}
}
#[doc = "Checks if the value of the field is `VALUE1`"]
#[inline]
pub fn is_value1(&self) -> bool {
*self == S3IR::VALUE1
}
#[doc = "Checks if the value of the field is `VALUE2`"]
#[inline]
pub fn is_value2(&self) -> bool {
*self == S3IR::VALUE2
}
}
#[doc = "Possible values of the field `PRB`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PRBR {
#[doc = "Prescaler is stopped"]
VALUE1,
#[doc = "Prescaler is running"]
VALUE2,
}
impl PRBR {
#[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 as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
PRBR::VALUE1 => false,
PRBR::VALUE2 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> PRBR {
match value {
false => PRBR::VALUE1,
true => PRBR::VALUE2,
}
}
#[doc = "Checks if the value of the field is `VALUE1`"]
#[inline]
pub fn is_value1(&self) -> bool {
*self == PRBR::VALUE1
}
#[doc = "Checks if the value of the field is `VALUE2`"]
#[inline]
pub fn is_value2(&self) -> bool {
*self == PRBR::VALUE2
}
}
#[doc = "Possible values of the field `PCRB`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PCRBR {
#[doc = "Parity Checker is stopped"]
VALUE1,
#[doc = "Parity Checker is running"]
VALUE2,
}
impl PCRBR {
#[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 as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
PCRBR::VALUE1 => false,
PCRBR::VALUE2 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> PCRBR {
match value {
false => PCRBR::VALUE1,
true => PCRBR::VALUE2,
}
}
#[doc = "Checks if the value of the field is `VALUE1`"]
#[inline]
pub fn is_value1(&self) -> bool {
*self == PCRBR::VALUE1
}
#[doc = "Checks if the value of the field is `VALUE2`"]
#[inline]
pub fn is_value2(&self) -> bool {
*self == PCRBR::VALUE2
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bit 0 - CC80 IDLE status"]
#[inline]
pub fn s0i(&self) -> S0IR {
S0IR::_from({
const MASK: bool = true;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 1 - CC81 IDLE status"]
#[inline]
pub fn s1i(&self) -> S1IR {
S1IR::_from({
const MASK: bool = true;
const OFFSET: u8 = 1;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 2 - CC82 IDLE status"]
#[inline]
pub fn s2i(&self) -> S2IR {
S2IR::_from({
const MASK: bool = true;
const OFFSET: u8 = 2;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 3 - CC83 IDLE status"]
#[inline]
pub fn s3i(&self) -> S3IR {
S3IR::_from({
const MASK: bool = true;
const OFFSET: u8 = 3;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 8 - Prescaler Run Bit"]
#[inline]
pub fn prb(&self) -> PRBR {
PRBR::_from({
const MASK: bool = true;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 10 - Parity Checker Run Bit"]
#[inline]
pub fn pcrb(&self) -> PCRBR {
PCRBR::_from({
const MASK: bool = true;
const OFFSET: u8 = 10;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
}