21 lines
945 B
C++
21 lines
945 B
C++
/*
|
||
* ProtectedMemory.cpp
|
||
*
|
||
* Created on: 6 апр. 2021 г.
|
||
* Author: titov
|
||
*/
|
||
|
||
#include "ProtectedMemory.hh"
|
||
|
||
bool defualt_lock( peripheral::protected_char * begin, std::size_t size ) { return true; }
|
||
void defualt_unlock( peripheral::protected_char * begin, std::size_t size ) {}
|
||
|
||
bool defualt_constlock( const peripheral::protected_char * begin, std::size_t size ) { return true; }
|
||
void defualt_constunlock( const peripheral::protected_char * begin, std::size_t size ) {}
|
||
|
||
bool (* peripheral::write_lock) ( peripheral::protected_char * begin, std::size_t size ) = &defualt_lock;
|
||
void (* peripheral::write_unlock) ( peripheral::protected_char * begin, std::size_t size ) = &defualt_unlock;
|
||
bool (* peripheral::read_lock) ( const peripheral::protected_char * begin, std::size_t size ) = &defualt_constlock;
|
||
void (* peripheral::read_unlock) ( const peripheral::protected_char * begin, std::size_t size ) = &defualt_constunlock;
|
||
|