You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
880 B

4 years ago
#include "stdint.h"
#include <exception>
#include "model/hardware/device/SonoDevice.h"
class myexception: public std::exception
{
private:
char* _message;
public:
myexception(char* message) { _message = message; }
virtual const char* what() const noexcept
{
return _message;
}
};
class UltraSoundDevice
{
public:
UltraSoundDevice();
~UltraSoundDevice();
SonoDevice* device;
uint8_t readByte(uint32_t address, uint32_t bar);
uint16_t readShort(uint32_t address, uint32_t bar);
uint32_t readWord(uint32_t address, uint32_t bar);
uint64_t readLong(uint32_t address, uint32_t bar);
void writeByte(uint32_t address, uint32_t bar, uint8_t data);
void writeShort(uint32_t address, uint32_t bar, uint16_t data);
void writeWord(uint32_t address, uint32_t bar, uint32_t data);
void writeLong(uint32_t address, uint32_t bar, uint64_t data);
};