Type Alias esp32h2::spi0::spi_mem_dpa_ctrl::W

source ·
pub type W = W<SPI_MEM_DPA_CTRL_SPEC>;
Expand description

Register SPI_MEM_DPA_CTRL writer

Aliased Type§

struct W { /* private fields */ }

Implementations§

source§

impl W

source

pub fn spi_crypt_security_level( &mut self ) -> SPI_CRYPT_SECURITY_LEVEL_W<'_, SPI_MEM_DPA_CTRL_SPEC>

Bits 0:2 - Set the security level of spi mem cryption. 0: Shut off cryption DPA funtion. 1-7: The bigger the number is, the more secure the cryption is. (Note that the performance of cryption will decrease together with this number increasing)

source

pub fn spi_crypt_calc_d_dpa_en( &mut self ) -> SPI_CRYPT_CALC_D_DPA_EN_W<'_, SPI_MEM_DPA_CTRL_SPEC>

Bit 3 - Only available when SPI_CRYPT_SECURITY_LEVEL is not 0. 1: Enable DPA in the calculation that using key 1 or key 2. 0: Enable DPA only in the calculation that using key 1.

source

pub fn spi_crypt_dpa_select_register( &mut self ) -> SPI_CRYPT_DPA_SELECT_REGISTER_W<'_, SPI_MEM_DPA_CTRL_SPEC>

Bit 4 - 1: MSPI XTS DPA clock gate is controlled by SPI_CRYPT_CALC_D_DPA_EN and SPI_CRYPT_SECURITY_LEVEL. 0: Controlled by efuse bits.

source

pub unsafe fn bits(&mut self, bits: u32) -> &mut Self

Writes raw bits to the register.

Safety

Passing incorrect value can cause undefined behaviour. See reference manual