Tidied structure of all classes within the entire code base

Also some other small bits of tidying
This commit is contained in:
Nav
2021-10-06 21:12:31 +01:00
parent 1aef5bba79
commit 6edfb7376a
179 changed files with 3446 additions and 3493 deletions

View File

@@ -10,19 +10,6 @@ namespace Bloom::Usb
{
class Interface
{
protected:
libusb_device* libUsbDevice = nullptr;
libusb_device_handle* libUsbDeviceHandle = nullptr;
std::uint16_t vendorId = 0;
std::uint16_t productId = 0;
std::uint8_t number = 0;
std::string name;
bool initialised = false;
bool claimed = false;
public:
explicit Interface(const std::uint8_t& interfaceNumber = 0) {
this->setNumber(interfaceNumber);
@@ -112,5 +99,18 @@ namespace Bloom::Usb
*/
virtual int read(unsigned char* buffer, unsigned char endPoint, std::size_t length, std::size_t timeout);
virtual void write(unsigned char* buffer, unsigned char endPoint, int length);
protected:
libusb_device* libUsbDevice = nullptr;
libusb_device_handle* libUsbDeviceHandle = nullptr;
std::uint16_t vendorId = 0;
std::uint16_t productId = 0;
std::uint8_t number = 0;
std::string name;
bool initialised = false;
bool claimed = false;
};
}