mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-24 17:09:39 -04:00
47 lines
889 B
C++
47 lines
889 B
C++
/*
|
|
* @file DriverInterface.hpp
|
|
* @author Mateusz Piesta (mateusz.piesta@mudita.com)
|
|
* @date 29.07.19
|
|
* @brief
|
|
* @copyright Copyright (C) 2019 mudita.com
|
|
* @details
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PUREPHONE_DRIVERINTERFACE_HPP
|
|
#define PUREPHONE_DRIVERINTERFACE_HPP
|
|
|
|
#include <memory>
|
|
|
|
class DriverParams {
|
|
|
|
};
|
|
|
|
class IoctlParams {
|
|
|
|
};
|
|
|
|
class DriverInterface {
|
|
|
|
public:
|
|
|
|
template<typename T>
|
|
std::shared_ptr<DriverInterface> Create(T, const DriverParams ¶ms){
|
|
return T::Create(params);
|
|
}
|
|
|
|
DriverInterface(const DriverParams ¶ms);
|
|
virtual ~DriverInterface();
|
|
|
|
virtual ssize_t Write(const uint8_t *data, const size_t len, const DriverParams ¶ms) = 0;
|
|
|
|
virtual ssize_t Read(uint8_t *data, const size_t len, const DriverParams ¶ms) = 0;
|
|
|
|
virtual int32_t Ioctl(const IoctlParams &ioctlParams) = 0;
|
|
|
|
};
|
|
|
|
|
|
#endif //PUREPHONE_DRIVERINTERFACE_HPP
|