mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Embed: (wiki syntax)

« Back to documentation index

ScopedRomWriteLock Class Reference

ScopedRomWriteLock Class Reference
[Platform]

RAII object for disabling, then restoring ROM write never mode Usage: More...

#include <ScopedRomWriteLock.h>

Inherits NonCopyable< ScopedRomWriteLock >, and NonCopyable< ScopedRomWriteLock >.

Public Member Functions

 ScopedRomWriteLock ()
 Allow writing to ROM.
 ~ScopedRomWriteLock ()
 Restore previous write to ROM settings.
 ScopedRomWriteLock ()
 Allow writing to ROM.
 ~ScopedRomWriteLock ()
 Restore previous write to ROM settings.

Private Member Functions

 MBED_DEPRECATED ("Invalid copy construction of a NonCopyable resource.") NonCopyable(const NonCopyable &)
 NonCopyable copy constructor.
 MBED_DEPRECATED ("Invalid copy assignment of a NonCopyable resource.") NonCopyable &operator
 NonCopyable copy assignment operator.
 MBED_DEPRECATED ("Invalid copy construction of a NonCopyable resource.") NonCopyable(const NonCopyable &)
 NonCopyable copy constructor.
 MBED_DEPRECATED ("Invalid copy assignment of a NonCopyable resource.") NonCopyable &operator
 NonCopyable copy assignment operator.

Detailed Description

RAII object for disabling, then restoring ROM write never mode Usage:

 void f() {
     // some code here
     {
         ScopedRomWriteLock make_ram_executable;
         // Code in this block is allowed to write to ROM
     }
     // Writing to ROM is no longer allowed
 }

Definition at line 41 of file cmsis/BUILD/mbed/platform/ScopedRomWriteLock.h.


Constructor & Destructor Documentation

Allow writing to ROM.

Increment the ROM write lock to ensure code can write to ROM. This class uses RAII to allow writing to ROM while it is in scope.

Definition at line 51 of file cmsis/BUILD/mbed/platform/ScopedRomWriteLock.h.

Restore previous write to ROM settings.

Decrement the ROM write lock to return ROM write to its prior state.

Definition at line 62 of file cmsis/BUILD/mbed/platform/ScopedRomWriteLock.h.

Allow writing to ROM.

Increment the ROM write lock to ensure code can write to ROM. This class uses RAII to allow writing to ROM while it is in scope.

Definition at line 51 of file platform/ScopedRomWriteLock.h.

Restore previous write to ROM settings.

Decrement the ROM write lock to return ROM write to its prior state.

Definition at line 62 of file platform/ScopedRomWriteLock.h.