2 #include "../regs/regs.h" 3 #include "../keyboard.h" 12 char serialNumber[Ion::SerialNumberLength+1];
26 !
c.isSoftDisconnected()) {
29 if (!
c.isSoftDisconnected()) {
32 if (
c.resetOnDisconnect()) {
45 if (type == m_microsoftOSStringDescriptor.
type() && index == 0xEE) {
46 return &m_microsoftOSStringDescriptor;
49 for (
size_t i=0; i<
sizeof(m_descriptors)/
sizeof(m_descriptors[0]); i++) {
54 if (typeCount == index) {
68 if (request->
bRequest() == k_webUSBVendorCode && request->
wIndex() == 2) {
71 return getURLCommand(transferBuffer, transferBufferLength, transferBufferMaxLength);
73 if (request->
bRequest() == k_microsoftOSVendorCode && request->
wIndex() == 0x0004) {
76 return getExtendedCompatIDCommand(transferBuffer, transferBufferLength, transferBufferMaxLength);
82 bool Calculator::getURLCommand(
uint8_t * transferBuffer,
uint16_t * transferBufferLength,
uint16_t transferBufferMaxLength) {
83 *transferBufferLength = m_workshopURLDescriptor.
copy(transferBuffer, transferBufferMaxLength);
87 bool Calculator::getExtendedCompatIDCommand(
uint8_t * transferBuffer,
uint16_t * transferBufferLength,
uint16_t transferBufferMaxLength) {
88 *transferBufferLength = m_extendedCompatIdDescriptor.
copy(transferBuffer, transferBufferMaxLength);
bool columnIsActive(uint8_t column)
virtual Descriptor * descriptor(uint8_t type, uint8_t index) override
uint16_t copy(void *target, size_t maxSize) const
uint8_t columnForKey(Key key)
void activateRow(uint8_t row)
bool processSetupInRequest(SetupPacket *request, uint8_t *transferBuffer, uint16_t *transferBufferLength, uint16_t transferBufferMaxLength) override
void getSerialNumber(char *buffer)
bool processSetupInRequest(SetupPacket *request, uint8_t *transferBuffer, uint16_t *transferBufferLength, uint16_t transferBufferMaxLength) override
RequestType requestType() const
static void PollAndReset(bool exitWithKeyboard)
uint8_t rowForKey(Key key)