mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
30 lines
645 B
C++
30 lines
645 B
C++
#include "device_descriptor.h"
|
|
|
|
namespace Ion {
|
|
namespace USB {
|
|
namespace Device {
|
|
|
|
void DeviceDescriptor::push(Channel * c) const {
|
|
Descriptor::push(c);
|
|
c->push(m_bcdUSB);
|
|
c->push(m_bDeviceClass);
|
|
c->push(m_bDeviceSubClass);
|
|
c->push(m_bDeviceProtocol);
|
|
c->push(m_bMaxPacketSize0);
|
|
c->push(m_idVendor);
|
|
c->push(m_idProduct);
|
|
c->push(m_bcdDevice);
|
|
c->push(m_iManufacturer);
|
|
c->push(m_iProduct);
|
|
c->push(m_iSerialNumber);
|
|
c->push(m_bNumConfigurations);
|
|
}
|
|
|
|
uint8_t DeviceDescriptor::bLength() const {
|
|
return Descriptor::bLength() + sizeof(uint16_t) + 4*sizeof(uint8_t) + 3*sizeof(uint16_t) + 4*sizeof(uint8_t);
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|