37 lines
727 B
C++
37 lines
727 B
C++
/*
|
||
* NetXDpmChannel.hh
|
||
*
|
||
* Created on: 15 Feb. 2022 г.
|
||
* Author: malyarenko
|
||
*/
|
||
|
||
#ifndef UMLIBRARY_DRIVER_NETX_NETXDPMCHANNEL_HH_
|
||
#define UMLIBRARY_DRIVER_NETX_NETXDPMCHANNEL_HH_
|
||
|
||
#include <utility>
|
||
#include <stdint.h>
|
||
|
||
#include "../../peripheral/ProtectedMemory.hh"
|
||
|
||
namespace driver {
|
||
namespace netx {
|
||
|
||
template<typename Layout>
|
||
class NetXDpmChannel {
|
||
public:
|
||
peripheral::protected_char * origin;
|
||
std::size_t size;
|
||
|
||
Layout * mapLayout();
|
||
};
|
||
|
||
} /* namespace netx */
|
||
} /* namespace driver */
|
||
|
||
template<typename Layout>
|
||
inline Layout* driver::netx::NetXDpmChannel<Layout>::mapLayout() {
|
||
return reinterpret_cast<Layout *>(this->origin);
|
||
}
|
||
|
||
#endif /* UMLIBRARY_DRIVER_NETX_NETXDPMCHANNEL_HH_ */
|