#[doc = "Reader of register CTL"]
pub type R = crate::R<u32, super::CTL>;
#[doc = "Writer for register CTL"]
pub type W = crate::W<u32, super::CTL>;
#[doc = "Register CTL `reset()`'s with value 0x80"]
impl crate::ResetValue for super::CTL {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0x80
}
}
#[doc = "Option byte reload bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OBRLD_A {
#[doc = "1: Force option bytes reload and reset"]
RELOAD = 1,
}
impl From<OBRLD_A> for bool {
#[inline(always)]
fn from(variant: OBRLD_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `OBRLD`"]
pub type OBRLD_R = crate::R<bool, OBRLD_A>;
impl OBRLD_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, OBRLD_A> {
use crate::Variant::*;
match self.bits {
true => Val(OBRLD_A::RELOAD),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `RELOAD`"]
#[inline(always)]
pub fn is_reload(&self) -> bool {
*self == OBRLD_A::RELOAD
}
}
#[doc = "Write proxy for field `OBRLD`"]
pub struct OBRLD_W<'a> {
w: &'a mut W,
}
impl<'a> OBRLD_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OBRLD_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Force option bytes reload and reset"]
#[inline(always)]
pub fn reload(self) -> &'a mut W {
self.variant(OBRLD_A::RELOAD)
}
#[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 = "End of operation interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDIE_A {
#[doc = "0: End of operation interrupt disabled"]
DISABLED = 0,
#[doc = "1: End of operation interrupt enabled"]
ENABLED = 1,
}
impl From<ENDIE_A> for bool {
#[inline(always)]
fn from(variant: ENDIE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `ENDIE`"]
pub type ENDIE_R = crate::R<bool, ENDIE_A>;
impl ENDIE_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENDIE_A {
match self.bits {
false => ENDIE_A::DISABLED,
true => ENDIE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENDIE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENDIE_A::ENABLED
}
}
#[doc = "Write proxy for field `ENDIE`"]
pub struct ENDIE_W<'a> {
w: &'a mut W,
}
impl<'a> ENDIE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ENDIE_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "End of operation interrupt disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENDIE_A::DISABLED)
}
#[doc = "End of operation interrupt enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENDIE_A::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 = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
self.w
}
}
#[doc = "Error interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ERRIE_A {
#[doc = "0: Error interrupt generation disabled"]
DISABLED = 0,
#[doc = "1: Error interrupt generation enabled"]
ENABLED = 1,
}
impl From<ERRIE_A> for bool {
#[inline(always)]
fn from(variant: ERRIE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `ERRIE`"]
pub type ERRIE_R = crate::R<bool, ERRIE_A>;
impl ERRIE_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ERRIE_A {
match self.bits {
false => ERRIE_A::DISABLED,
true => ERRIE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ERRIE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ERRIE_A::ENABLED
}
}
#[doc = "Write proxy for field `ERRIE`"]
pub struct ERRIE_W<'a> {
w: &'a mut W,
}
impl<'a> ERRIE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ERRIE_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Error interrupt generation disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ERRIE_A::DISABLED)
}
#[doc = "Error interrupt generation enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ERRIE_A::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 = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
self.w
}
}
#[doc = "Option byte erase/program enable bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OBWEN_A {
#[doc = "0: Option byte write disabled"]
DISABLED = 0,
#[doc = "1: Option byte write enabled"]
ENABLED = 1,
}
impl From<OBWEN_A> for bool {
#[inline(always)]
fn from(variant: OBWEN_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `OBWEN`"]
pub type OBWEN_R = crate::R<bool, OBWEN_A>;
impl OBWEN_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> OBWEN_A {
match self.bits {
false => OBWEN_A::DISABLED,
true => OBWEN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == OBWEN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == OBWEN_A::ENABLED
}
}
#[doc = "Option byte erase/program enable bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OBWEN_AW {
#[doc = "0: Disable option byte write"]
DISABLE = 0,
}
impl From<OBWEN_AW> for bool {
#[inline(always)]
fn from(variant: OBWEN_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Write proxy for field `OBWEN`"]
pub struct OBWEN_W<'a> {
w: &'a mut W,
}
impl<'a> OBWEN_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OBWEN_AW) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable option byte write"]
#[inline(always)]
pub fn disable(self) -> &'a mut W {
self.variant(OBWEN_AW::DISABLE)
}
#[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 = "FMC_CTL lock bit\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LK_A {
#[doc = "0: CTL register is unlocked"]
UNLOCKED = 0,
#[doc = "1: CTL register is locked"]
LOCKED = 1,
}
impl From<LK_A> for bool {
#[inline(always)]
fn from(variant: LK_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `LK`"]
pub type LK_R = crate::R<bool, LK_A>;
impl LK_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> LK_A {
match self.bits {
false => LK_A::UNLOCKED,
true => LK_A::LOCKED,
}
}
#[doc = "Checks if the value of the field is `UNLOCKED`"]
#[inline(always)]
pub fn is_unlocked(&self) -> bool {
*self == LK_A::UNLOCKED
}
#[doc = "Checks if the value of the field is `LOCKED`"]
#[inline(always)]
pub fn is_locked(&self) -> bool {
*self == LK_A::LOCKED
}
}
#[doc = "FMC_CTL lock bit\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LK_AW {
#[doc = "1: Lock CTL register"]
LOCK = 1,
}
impl From<LK_AW> for bool {
#[inline(always)]
fn from(variant: LK_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Write proxy for field `LK`"]
pub struct LK_W<'a> {
w: &'a mut W,
}
impl<'a> LK_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: LK_AW) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Lock CTL register"]
#[inline(always)]
pub fn lock(self) -> &'a mut W {
self.variant(LK_AW::LOCK)
}
#[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 = "Send erase command to FMC bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum START_A {
#[doc = "1: Trigger an erase operation"]
START = 1,
}
impl From<START_A> for bool {
#[inline(always)]
fn from(variant: START_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `START`"]
pub type START_R = crate::R<bool, START_A>;
impl START_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, START_A> {
use crate::Variant::*;
match self.bits {
true => Val(START_A::START),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `START`"]
#[inline(always)]
pub fn is_start(&self) -> bool {
*self == START_A::START
}
}
#[doc = "Write proxy for field `START`"]
pub struct START_W<'a> {
w: &'a mut W,
}
impl<'a> START_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: START_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Trigger an erase operation"]
#[inline(always)]
pub fn start(self) -> &'a mut W {
self.variant(START_A::START)
}
#[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 = "Option byte erase command bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OBER_A {
#[doc = "1: Erase option byte activated"]
OPTIONBYTEERASE = 1,
}
impl From<OBER_A> for bool {
#[inline(always)]
fn from(variant: OBER_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `OBER`"]
pub type OBER_R = crate::R<bool, OBER_A>;
impl OBER_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, OBER_A> {
use crate::Variant::*;
match self.bits {
true => Val(OBER_A::OPTIONBYTEERASE),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `OPTIONBYTEERASE`"]
#[inline(always)]
pub fn is_option_byte_erase(&self) -> bool {
*self == OBER_A::OPTIONBYTEERASE
}
}
#[doc = "Write proxy for field `OBER`"]
pub struct OBER_W<'a> {
w: &'a mut W,
}
impl<'a> OBER_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OBER_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Erase option byte activated"]
#[inline(always)]
pub fn option_byte_erase(self) -> &'a mut W {
self.variant(OBER_A::OPTIONBYTEERASE)
}
#[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 = "Option byte program command bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OBPG_A {
#[doc = "1: Program option byte activated"]
OPTIONBYTEPROGRAMMING = 1,
}
impl From<OBPG_A> for bool {
#[inline(always)]
fn from(variant: OBPG_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `OBPG`"]
pub type OBPG_R = crate::R<bool, OBPG_A>;
impl OBPG_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, OBPG_A> {
use crate::Variant::*;
match self.bits {
true => Val(OBPG_A::OPTIONBYTEPROGRAMMING),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `OPTIONBYTEPROGRAMMING`"]
#[inline(always)]
pub fn is_option_byte_programming(&self) -> bool {
*self == OBPG_A::OPTIONBYTEPROGRAMMING
}
}
#[doc = "Write proxy for field `OBPG`"]
pub struct OBPG_W<'a> {
w: &'a mut W,
}
impl<'a> OBPG_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OBPG_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Program option byte activated"]
#[inline(always)]
pub fn option_byte_programming(self) -> &'a mut W {
self.variant(OBPG_A::OPTIONBYTEPROGRAMMING)
}
#[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 = "Main flash mass erase command bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MER_A {
#[doc = "1: Erase activated for all user sectors"]
MASSERASE = 1,
}
impl From<MER_A> for bool {
#[inline(always)]
fn from(variant: MER_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `MER`"]
pub type MER_R = crate::R<bool, MER_A>;
impl MER_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, MER_A> {
use crate::Variant::*;
match self.bits {
true => Val(MER_A::MASSERASE),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `MASSERASE`"]
#[inline(always)]
pub fn is_mass_erase(&self) -> bool {
*self == MER_A::MASSERASE
}
}
#[doc = "Write proxy for field `MER`"]
pub struct MER_W<'a> {
w: &'a mut W,
}
impl<'a> MER_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: MER_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Erase activated for all user sectors"]
#[inline(always)]
pub fn mass_erase(self) -> &'a mut W {
self.variant(MER_A::MASSERASE)
}
#[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 = "Main flash page erase command bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PER_A {
#[doc = "1: Erase activated for selected page"]
PAGEERASE = 1,
}
impl From<PER_A> for bool {
#[inline(always)]
fn from(variant: PER_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `PER`"]
pub type PER_R = crate::R<bool, PER_A>;
impl PER_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, PER_A> {
use crate::Variant::*;
match self.bits {
true => Val(PER_A::PAGEERASE),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `PAGEERASE`"]
#[inline(always)]
pub fn is_page_erase(&self) -> bool {
*self == PER_A::PAGEERASE
}
}
#[doc = "Write proxy for field `PER`"]
pub struct PER_W<'a> {
w: &'a mut W,
}
impl<'a> PER_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PER_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Erase activated for selected page"]
#[inline(always)]
pub fn page_erase(self) -> &'a mut W {
self.variant(PER_A::PAGEERASE)
}
#[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 = "Main flash page program command bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PG_A {
#[doc = "1: Flash programming activated"]
PROGRAM = 1,
}
impl From<PG_A> for bool {
#[inline(always)]
fn from(variant: PG_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `PG`"]
pub type PG_R = crate::R<bool, PG_A>;
impl PG_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, PG_A> {
use crate::Variant::*;
match self.bits {
true => Val(PG_A::PROGRAM),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `PROGRAM`"]
#[inline(always)]
pub fn is_program(&self) -> bool {
*self == PG_A::PROGRAM
}
}
#[doc = "Write proxy for field `PG`"]
pub struct PG_W<'a> {
w: &'a mut W,
}
impl<'a> PG_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PG_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Flash programming activated"]
#[inline(always)]
pub fn program(self) -> &'a mut W {
self.variant(PG_A::PROGRAM)
}
#[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 13 - Option byte reload bit"]
#[inline(always)]
pub fn obrld(&self) -> OBRLD_R {
OBRLD_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 12 - End of operation interrupt enable"]
#[inline(always)]
pub fn endie(&self) -> ENDIE_R {
ENDIE_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 10 - Error interrupt enable"]
#[inline(always)]
pub fn errie(&self) -> ERRIE_R {
ERRIE_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 9 - Option byte erase/program enable bit"]
#[inline(always)]
pub fn obwen(&self) -> OBWEN_R {
OBWEN_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 7 - FMC_CTL lock bit"]
#[inline(always)]
pub fn lk(&self) -> LK_R {
LK_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 6 - Send erase command to FMC bit"]
#[inline(always)]
pub fn start(&self) -> START_R {
START_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5 - Option byte erase command bit"]
#[inline(always)]
pub fn ober(&self) -> OBER_R {
OBER_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - Option byte program command bit"]
#[inline(always)]
pub fn obpg(&self) -> OBPG_R {
OBPG_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 2 - Main flash mass erase command bit"]
#[inline(always)]
pub fn mer(&self) -> MER_R {
MER_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - Main flash page erase command bit"]
#[inline(always)]
pub fn per(&self) -> PER_R {
PER_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - Main flash page program command bit"]
#[inline(always)]
pub fn pg(&self) -> PG_R {
PG_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 13 - Option byte reload bit"]
#[inline(always)]
pub fn obrld(&mut self) -> OBRLD_W {
OBRLD_W { w: self }
}
#[doc = "Bit 12 - End of operation interrupt enable"]
#[inline(always)]
pub fn endie(&mut self) -> ENDIE_W {
ENDIE_W { w: self }
}
#[doc = "Bit 10 - Error interrupt enable"]
#[inline(always)]
pub fn errie(&mut self) -> ERRIE_W {
ERRIE_W { w: self }
}
#[doc = "Bit 9 - Option byte erase/program enable bit"]
#[inline(always)]
pub fn obwen(&mut self) -> OBWEN_W {
OBWEN_W { w: self }
}
#[doc = "Bit 7 - FMC_CTL lock bit"]
#[inline(always)]
pub fn lk(&mut self) -> LK_W {
LK_W { w: self }
}
#[doc = "Bit 6 - Send erase command to FMC bit"]
#[inline(always)]
pub fn start(&mut self) -> START_W {
START_W { w: self }
}
#[doc = "Bit 5 - Option byte erase command bit"]
#[inline(always)]
pub fn ober(&mut self) -> OBER_W {
OBER_W { w: self }
}
#[doc = "Bit 4 - Option byte program command bit"]
#[inline(always)]
pub fn obpg(&mut self) -> OBPG_W {
OBPG_W { w: self }
}
#[doc = "Bit 2 - Main flash mass erase command bit"]
#[inline(always)]
pub fn mer(&mut self) -> MER_W {
MER_W { w: self }
}
#[doc = "Bit 1 - Main flash page erase command bit"]
#[inline(always)]
pub fn per(&mut self) -> PER_W {
PER_W { w: self }
}
#[doc = "Bit 0 - Main flash page program command bit"]
#[inline(always)]
pub fn pg(&mut self) -> PG_W {
PG_W { w: self }
}
}