#[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::SYSCONFIG {
    #[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 = r"Value of the field"]
pub struct AES_SYSCONFIG_SOFTRESETR {
    bits: bool,
}
impl AES_SYSCONFIG_SOFTRESETR {
    #[doc = r"Value of the field as raw bits"]
    #[inline(always)]
    pub fn bit(&self) -> bool {
        self.bits
    }
    #[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"Proxy"]
pub struct _AES_SYSCONFIG_SOFTRESETW<'a> {
    w: &'a mut W,
}
impl<'a> _AES_SYSCONFIG_SOFTRESETW<'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 &= !(1 << 1);
        self.w.bits |= ((value as u32) & 1) << 1;
        self.w
    }
}
#[doc = r"Value of the field"]
pub struct AES_SYSCONFIG_DMA_REQ_DATA_IN_ENR {
    bits: bool,
}
impl AES_SYSCONFIG_DMA_REQ_DATA_IN_ENR {
    #[doc = r"Value of the field as raw bits"]
    #[inline(always)]
    pub fn bit(&self) -> bool {
        self.bits
    }
    #[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"Proxy"]
pub struct _AES_SYSCONFIG_DMA_REQ_DATA_IN_ENW<'a> {
    w: &'a mut W,
}
impl<'a> _AES_SYSCONFIG_DMA_REQ_DATA_IN_ENW<'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 &= !(1 << 5);
        self.w.bits |= ((value as u32) & 1) << 5;
        self.w
    }
}
#[doc = r"Value of the field"]
pub struct AES_SYSCONFIG_DMA_REQ_DATA_OUT_ENR {
    bits: bool,
}
impl AES_SYSCONFIG_DMA_REQ_DATA_OUT_ENR {
    #[doc = r"Value of the field as raw bits"]
    #[inline(always)]
    pub fn bit(&self) -> bool {
        self.bits
    }
    #[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"Proxy"]
pub struct _AES_SYSCONFIG_DMA_REQ_DATA_OUT_ENW<'a> {
    w: &'a mut W,
}
impl<'a> _AES_SYSCONFIG_DMA_REQ_DATA_OUT_ENW<'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 &= !(1 << 6);
        self.w.bits |= ((value as u32) & 1) << 6;
        self.w
    }
}
#[doc = r"Value of the field"]
pub struct AES_SYSCONFIG_DMA_REQ_CONTEXT_IN_ENR {
    bits: bool,
}
impl AES_SYSCONFIG_DMA_REQ_CONTEXT_IN_ENR {
    #[doc = r"Value of the field as raw bits"]
    #[inline(always)]
    pub fn bit(&self) -> bool {
        self.bits
    }
    #[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"Proxy"]
pub struct _AES_SYSCONFIG_DMA_REQ_CONTEXT_IN_ENW<'a> {
    w: &'a mut W,
}
impl<'a> _AES_SYSCONFIG_DMA_REQ_CONTEXT_IN_ENW<'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 &= !(1 << 7);
        self.w.bits |= ((value as u32) & 1) << 7;
        self.w
    }
}
#[doc = r"Value of the field"]
pub struct AES_SYSCONFIG_DMA_REQ_CONTEXT_OUT_ENR {
    bits: bool,
}
impl AES_SYSCONFIG_DMA_REQ_CONTEXT_OUT_ENR {
    #[doc = r"Value of the field as raw bits"]
    #[inline(always)]
    pub fn bit(&self) -> bool {
        self.bits
    }
    #[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"Proxy"]
pub struct _AES_SYSCONFIG_DMA_REQ_CONTEXT_OUT_ENW<'a> {
    w: &'a mut W,
}
impl<'a> _AES_SYSCONFIG_DMA_REQ_CONTEXT_OUT_ENW<'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 &= !(1 << 8);
        self.w.bits |= ((value as u32) & 1) << 8;
        self.w
    }
}
#[doc = r"Value of the field"]
pub struct AES_SYSCONFIG_MAP_CONTEXT_OUT_ON_DATA_OUTR {
    bits: bool,
}
impl AES_SYSCONFIG_MAP_CONTEXT_OUT_ON_DATA_OUTR {
    #[doc = r"Value of the field as raw bits"]
    #[inline(always)]
    pub fn bit(&self) -> bool {
        self.bits
    }
    #[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"Proxy"]
pub struct _AES_SYSCONFIG_MAP_CONTEXT_OUT_ON_DATA_OUTW<'a> {
    w: &'a mut W,
}
impl<'a> _AES_SYSCONFIG_MAP_CONTEXT_OUT_ON_DATA_OUTW<'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 &= !(1 << 9);
        self.w.bits |= ((value as u32) & 1) << 9;
        self.w
    }
}
#[doc = r"Value of the field"]
pub struct AES_SYSCONFIG_KEYENCR {
    bits: bool,
}
impl AES_SYSCONFIG_KEYENCR {
    #[doc = r"Value of the field as raw bits"]
    #[inline(always)]
    pub fn bit(&self) -> bool {
        self.bits
    }
    #[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"Proxy"]
pub struct _AES_SYSCONFIG_KEYENCW<'a> {
    w: &'a mut W,
}
impl<'a> _AES_SYSCONFIG_KEYENCW<'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 &= !(1 << 11);
        self.w.bits |= ((value as u32) & 1) << 11;
        self.w
    }
}
#[doc = r"Value of the field"]
pub struct AES_SYSCONFIG_K3R {
    bits: bool,
}
impl AES_SYSCONFIG_K3R {
    #[doc = r"Value of the field as raw bits"]
    #[inline(always)]
    pub fn bit(&self) -> bool {
        self.bits
    }
    #[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"Proxy"]
pub struct _AES_SYSCONFIG_K3W<'a> {
    w: &'a mut W,
}
impl<'a> _AES_SYSCONFIG_K3W<'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 &= !(1 << 12);
        self.w.bits |= ((value as u32) & 1) << 12;
        self.w
    }
}
impl R {
    #[doc = r"Value of the register as raw bits"]
    #[inline(always)]
    pub fn bits(&self) -> u32 {
        self.bits
    }
    #[doc = "Bit 1 - Soft reset"]
    #[inline(always)]
    pub fn aes_sysconfig_softreset(&self) -> AES_SYSCONFIG_SOFTRESETR {
        let bits = ((self.bits >> 1) & 1) != 0;
        AES_SYSCONFIG_SOFTRESETR { bits }
    }
    #[doc = "Bit 5 - DMA Request Data In Enable"]
    #[inline(always)]
    pub fn aes_sysconfig_dma_req_data_in_en(&self) -> AES_SYSCONFIG_DMA_REQ_DATA_IN_ENR {
        let bits = ((self.bits >> 5) & 1) != 0;
        AES_SYSCONFIG_DMA_REQ_DATA_IN_ENR { bits }
    }
    #[doc = "Bit 6 - DMA Request Data Out Enable"]
    #[inline(always)]
    pub fn aes_sysconfig_dma_req_data_out_en(&self) -> AES_SYSCONFIG_DMA_REQ_DATA_OUT_ENR {
        let bits = ((self.bits >> 6) & 1) != 0;
        AES_SYSCONFIG_DMA_REQ_DATA_OUT_ENR { bits }
    }
    #[doc = "Bit 7 - DMA Request Context In Enable"]
    #[inline(always)]
    pub fn aes_sysconfig_dma_req_context_in_en(&self) -> AES_SYSCONFIG_DMA_REQ_CONTEXT_IN_ENR {
        let bits = ((self.bits >> 7) & 1) != 0;
        AES_SYSCONFIG_DMA_REQ_CONTEXT_IN_ENR { bits }
    }
    #[doc = "Bit 8 - DMA Request Context Out Enable"]
    #[inline(always)]
    pub fn aes_sysconfig_dma_req_context_out_en(&self) -> AES_SYSCONFIG_DMA_REQ_CONTEXT_OUT_ENR {
        let bits = ((self.bits >> 8) & 1) != 0;
        AES_SYSCONFIG_DMA_REQ_CONTEXT_OUT_ENR { bits }
    }
    #[doc = "Bit 9 - Map Context Out on Data Out Enable"]
    #[inline(always)]
    pub fn aes_sysconfig_map_context_out_on_data_out(
        &self,
    ) -> AES_SYSCONFIG_MAP_CONTEXT_OUT_ON_DATA_OUTR {
        let bits = ((self.bits >> 9) & 1) != 0;
        AES_SYSCONFIG_MAP_CONTEXT_OUT_ON_DATA_OUTR { bits }
    }
    #[doc = "Bit 11 - Key Encoding"]
    #[inline(always)]
    pub fn aes_sysconfig_keyenc(&self) -> AES_SYSCONFIG_KEYENCR {
        let bits = ((self.bits >> 11) & 1) != 0;
        AES_SYSCONFIG_KEYENCR { bits }
    }
    #[doc = "Bit 12 - K3 Select"]
    #[inline(always)]
    pub fn aes_sysconfig_k3(&self) -> AES_SYSCONFIG_K3R {
        let bits = ((self.bits >> 12) & 1) != 0;
        AES_SYSCONFIG_K3R { bits }
    }
}
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 1 - Soft reset"]
    #[inline(always)]
    pub fn aes_sysconfig_softreset(&mut self) -> _AES_SYSCONFIG_SOFTRESETW {
        _AES_SYSCONFIG_SOFTRESETW { w: self }
    }
    #[doc = "Bit 5 - DMA Request Data In Enable"]
    #[inline(always)]
    pub fn aes_sysconfig_dma_req_data_in_en(&mut self) -> _AES_SYSCONFIG_DMA_REQ_DATA_IN_ENW {
        _AES_SYSCONFIG_DMA_REQ_DATA_IN_ENW { w: self }
    }
    #[doc = "Bit 6 - DMA Request Data Out Enable"]
    #[inline(always)]
    pub fn aes_sysconfig_dma_req_data_out_en(&mut self) -> _AES_SYSCONFIG_DMA_REQ_DATA_OUT_ENW {
        _AES_SYSCONFIG_DMA_REQ_DATA_OUT_ENW { w: self }
    }
    #[doc = "Bit 7 - DMA Request Context In Enable"]
    #[inline(always)]
    pub fn aes_sysconfig_dma_req_context_in_en(&mut self) -> _AES_SYSCONFIG_DMA_REQ_CONTEXT_IN_ENW {
        _AES_SYSCONFIG_DMA_REQ_CONTEXT_IN_ENW { w: self }
    }
    #[doc = "Bit 8 - DMA Request Context Out Enable"]
    #[inline(always)]
    pub fn aes_sysconfig_dma_req_context_out_en(
        &mut self,
    ) -> _AES_SYSCONFIG_DMA_REQ_CONTEXT_OUT_ENW {
        _AES_SYSCONFIG_DMA_REQ_CONTEXT_OUT_ENW { w: self }
    }
    #[doc = "Bit 9 - Map Context Out on Data Out Enable"]
    #[inline(always)]
    pub fn aes_sysconfig_map_context_out_on_data_out(
        &mut self,
    ) -> _AES_SYSCONFIG_MAP_CONTEXT_OUT_ON_DATA_OUTW {
        _AES_SYSCONFIG_MAP_CONTEXT_OUT_ON_DATA_OUTW { w: self }
    }
    #[doc = "Bit 11 - Key Encoding"]
    #[inline(always)]
    pub fn aes_sysconfig_keyenc(&mut self) -> _AES_SYSCONFIG_KEYENCW {
        _AES_SYSCONFIG_KEYENCW { w: self }
    }
    #[doc = "Bit 12 - K3 Select"]
    #[inline(always)]
    pub fn aes_sysconfig_k3(&mut self) -> _AES_SYSCONFIG_K3W {
        _AES_SYSCONFIG_K3W { w: self }
    }
}
