Fork for kernel 5.18 API change.
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.

21 lines
440 B

5 years ago
#include "stdint.h"
5 years ago
#define BAR_NUM 3
5 years ago
#define DEV_NAME "usd_reg"
class UltraSoundDevice
{
private:
void* bars[BAR_NUM];
int files[BAR_NUM];
public:
UltraSoundDevice();
~UltraSoundDevice();
uint8_t readByte(uint32_t address, uint32_t bar);
uint32_t readWord(uint32_t address, uint32_t bar);
void writeByte(uint32_t address, uint32_t bar, uint8_t data);
void writeWord(uint32_t address, uint32_t bar, uint32_t data);
};