mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-17 06:52:18 +01:00
[HID] Changed 'u8' to 'uint8_t' in definitions
This commit is contained in:
parent
fa52c41ede
commit
7d985f97a3
@ -23,13 +23,13 @@
|
||||
|
||||
HID_ HID;
|
||||
|
||||
static u8 HID_ENDPOINT_INT;
|
||||
static uint8_t HID_ENDPOINT_INT;
|
||||
|
||||
//================================================================================
|
||||
//================================================================================
|
||||
// HID Interface
|
||||
|
||||
static u8 HID_INTERFACE;
|
||||
static uint8_t HID_INTERFACE;
|
||||
|
||||
HIDDescriptor _hidInterface;
|
||||
|
||||
@ -40,10 +40,10 @@ static uint8_t modules_count = 0;
|
||||
//================================================================================
|
||||
// Driver
|
||||
|
||||
u8 _hid_protocol = 1;
|
||||
u8 _hid_idle = 1;
|
||||
uint8_t _hid_protocol = 1;
|
||||
uint8_t _hid_idle = 1;
|
||||
|
||||
int HID_GetInterface(u8* interfaceNum)
|
||||
int HID_GetInterface(uint8_t* interfaceNum)
|
||||
{
|
||||
interfaceNum[0] += 1; // uses 1
|
||||
_hidInterface =
|
||||
@ -91,13 +91,13 @@ void HID_::SendReport(u8 id, const void* data, int len)
|
||||
USB_Send(HID_TX | TRANSFER_RELEASE,data,len);
|
||||
}
|
||||
|
||||
bool HID_Setup(USBSetup& setup, u8 i)
|
||||
bool HID_Setup(USBSetup& setup, uint8_t i)
|
||||
{
|
||||
if (HID_INTERFACE != i) {
|
||||
return false;
|
||||
} else {
|
||||
u8 r = setup.bRequest;
|
||||
u8 requestType = setup.bmRequestType;
|
||||
uint8_t r = setup.bRequest;
|
||||
uint8_t requestType = setup.bmRequestType;
|
||||
if (REQUEST_DEVICETOHOST_CLASS_INTERFACE == requestType)
|
||||
{
|
||||
if (HID_GET_REPORT == r)
|
||||
|
@ -64,22 +64,22 @@ public:
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 len; // 9
|
||||
u8 dtype; // 0x21
|
||||
u8 addr;
|
||||
u8 versionL; // 0x101
|
||||
u8 versionH; // 0x101
|
||||
u8 country;
|
||||
u8 desctype; // 0x22 report
|
||||
u8 descLenL;
|
||||
u8 descLenH;
|
||||
uint8_t len; // 9
|
||||
uint8_t dtype; // 0x21
|
||||
uint8_t addr;
|
||||
uint8_t versionL; // 0x101
|
||||
uint8_t versionH; // 0x101
|
||||
uint8_t country;
|
||||
uint8_t desctype; // 0x22 report
|
||||
uint8_t descLenL;
|
||||
uint8_t descLenH;
|
||||
} HIDDescDescriptor;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
InterfaceDescriptor hid;
|
||||
HIDDescDescriptor desc;
|
||||
EndpointDescriptor in;
|
||||
InterfaceDescriptor hid;
|
||||
HIDDescDescriptor desc;
|
||||
EndpointDescriptor in;
|
||||
} HIDDescriptor;
|
||||
|
||||
#define HID_TX HID_ENDPOINT_INT
|
||||
|
Loading…
x
Reference in New Issue
Block a user