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.
 
 

62 lines
2.1 KiB

#include "api.h"
/*************************************************************************************************/
UltraSoundDevice::UltraSoundDevice()
{
device = new SonoDevice();
device->init();
}
/*************************************************************************************************/
UltraSoundDevice::~UltraSoundDevice()
{
}
/*************************************************************************************************/
uint8_t UltraSoundDevice::readByte(uint32_t address, uint32_t bar)
{
return device->device.readByte(bar, address);
}
/*************************************************************************************************/
uint16_t UltraSoundDevice::readShort(uint32_t address, uint32_t bar)
{
return device->device.readShort(bar, address);
}
/*************************************************************************************************/
uint32_t UltraSoundDevice::readWord(uint32_t address, uint32_t bar)
{
return device->device.readWord(bar, address);
}
/*************************************************************************************************/
uint64_t UltraSoundDevice::readLong(uint32_t address, uint32_t bar)
{
return device->device.readLong(bar, address);
}
/*************************************************************************************************/
void UltraSoundDevice::writeByte(uint32_t address, uint32_t bar, uint8_t data)
{
device->device.writeByte(bar, address, data);
}
/*************************************************************************************************/
void UltraSoundDevice::writeShort(uint32_t address, uint32_t bar, uint16_t data)
{
device->device.writeShort(bar, address, data);
}
/*************************************************************************************************/
void UltraSoundDevice::writeWord(uint32_t address, uint32_t bar, uint32_t data)
{
device->device.writeWord(bar, address, data);
}
/*************************************************************************************************/
void UltraSoundDevice::writeLong(uint32_t address, uint32_t bar, uint64_t data)
{
device->device.writeLong(bar, address, data);
}