Numworks Epsilon  1.4.1
Graphing Calculator Operating System
setup_packet.cpp
Go to the documentation of this file.
1 #include "setup_packet.h"
2 #include <string.h>
3 
4 namespace Ion {
5 namespace USB {
6 namespace Device {
7 
8 SetupPacket::SetupPacket(void * buffer) {
9  memcpy(this, buffer, sizeof(SetupPacket));
10 }
11 
13  if (m_wLength == 0 || (m_bmRequestType & 0b10000000) != 0) {
15  } else {
17  }
18 }
19 
21  return (RequestType) ((m_bmRequestType & 0b01100000) >> 5);
22 }
23 
25  return (RecipientType) (m_bmRequestType & 0b00001111);
26 }
27 
29  return m_wValue & 0xFF;
30 }
31 
33  return m_wValue >> 8;
34 }
35 
36 }
37 }
38 }
Definition: app.cpp:5
TransactionType followingTransaction() const
RecipientType recipientType() const
RequestType requestType() const
Definition: backlight.h:6
void * memcpy(void *dst, const void *src, size_t n)
Definition: memcpy.c:3