pub struct Ocotp { /* private fields */ }Expand description
LPC-Next0 OTP controller
Implementations§
Source§impl Ocotp
impl Ocotp
Sourcepub const PTR: *const RegisterBlock = {0x40130000 as *const ocotp::RegisterBlock}
pub const PTR: *const RegisterBlock = {0x40130000 as *const ocotp::RegisterBlock}
Pointer to the register block
Sourcepub const fn ptr() -> *const RegisterBlock
pub const fn ptr() -> *const RegisterBlock
Return the pointer to the register block
Sourcepub unsafe fn steal() -> Self
pub unsafe fn steal() -> Self
Steal an instance of this peripheral
§Safety
Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.
Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.
Methods from Deref<Target = RegisterBlock>§
Sourcepub fn otp_shadow(&self, n: usize) -> &OtpShadow
pub fn otp_shadow(&self, n: usize) -> &OtpShadow
0x00..0x7c0 - OTP shadow register N
Sourcepub fn otp_shadow_iter(&self) -> impl Iterator<Item = &OtpShadow>
pub fn otp_shadow_iter(&self) -> impl Iterator<Item = &OtpShadow>
Iterator for array of: 0x00..0x7c0 - OTP shadow register N
Sourcepub fn otp_write_data(&self) -> &OtpWriteData
pub fn otp_write_data(&self) -> &OtpWriteData
0x808 - OTP programming data register
Sourcepub fn otp_read_ctrl(&self) -> &OtpReadCtrl
pub fn otp_read_ctrl(&self) -> &OtpReadCtrl
0x80c - OTP read start register
Sourcepub fn otp_read_data(&self) -> &OtpReadData
pub fn otp_read_data(&self) -> &OtpReadData
0x810 - OTP read data register
Sourcepub fn otp_clk_div(&self) -> &OtpClkDiv
pub fn otp_clk_div(&self) -> &OtpClkDiv
0x814 - OTP clock divider register
Sourcepub fn otp_crc_addr(&self) -> &OtpCrcAddr
pub fn otp_crc_addr(&self) -> &OtpCrcAddr
0x81c - CRC address range register
Sourcepub fn otp_crc_value(&self) -> &OtpCrcValue
pub fn otp_crc_value(&self) -> &OtpCrcValue
0x820 - CRC result register
Sourcepub fn otp_status(&self) -> &OtpStatus
pub fn otp_status(&self) -> &OtpStatus
0x824 - Status register
Sourcepub fn otp_version(&self) -> &OtpVersion
pub fn otp_version(&self) -> &OtpVersion
0x82c - VERSION ID register