Skip to content

Commit 6ffd7e3

Browse files
committed
[PUSB] replaced u8 with uint8_t
1 parent 8f259c8 commit 6ffd7e3

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

hardware/arduino/avr/cores/arduino/PluggableUSB.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@
2525

2626
#define MAX_MODULES 6
2727

28-
static u8 lastIf = CDC_ACM_INTERFACE + CDC_INTERFACE_COUNT;
29-
static u8 lastEp = CDC_FIRST_ENDPOINT + CDC_ENPOINT_COUNT;
28+
static uint8_t lastIf = CDC_ACM_INTERFACE + CDC_INTERFACE_COUNT;
29+
static uint8_t lastEp = CDC_FIRST_ENDPOINT + CDC_ENPOINT_COUNT;
3030

31-
extern u8 _initEndpoints[];
31+
extern uint8_t _initEndpoints[];
3232

3333
//PUSBCallbacks cbs[MAX_MODULES];
34-
static u8 modules_count = 0;
34+
static uint8_t modules_count = 0;
3535

3636
static PUSBListNode* rootNode = NULL;
3737

38-
int PluggableUSB_::getInterface(u8* interfaceNum)
38+
int PluggableUSB_::getInterface(uint8_t* interfaceNum)
3939
{
4040
int ret = 0;
4141
PUSBListNode* node = rootNode;
42-
for (u8 i=0; i<modules_count; i++) {
42+
for (uint8_t i=0; i<modules_count; i++) {
4343
ret = node->getInterface(interfaceNum);
4444
node = node->next;
4545
}
@@ -50,18 +50,18 @@ int PluggableUSB_::getDescriptor(int8_t t)
5050
{
5151
int ret = 0;
5252
PUSBListNode* node = rootNode;
53-
for (u8 i=0; i<modules_count && ret == 0; i++) {
53+
for (uint8_t i=0; i<modules_count && ret == 0; i++) {
5454
ret = node->getDescriptor(t);
5555
node = node->next;
5656
}
5757
return ret;
5858
}
5959

60-
bool PluggableUSB_::setup(USBSetup& setup, u8 j)
60+
bool PluggableUSB_::setup(USBSetup& setup, uint8_t j)
6161
{
6262
bool ret = false;
6363
PUSBListNode* node = rootNode;
64-
for (u8 i=0; i<modules_count && ret == false; i++) {
64+
for (uint8_t i=0; i<modules_count && ret == false; i++) {
6565
ret = node->setup(setup, j);
6666
node = node->next;
6767
}

hardware/arduino/avr/cores/arduino/PluggableUSB.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
class PUSBListNode {
2929
public:
3030
PUSBListNode() { }
31-
bool (*setup)(USBSetup& setup, u8 i);
32-
int (*getInterface)(u8* interfaceNum);
31+
bool (*setup)(USBSetup& setup, uint8_t i);
32+
int (*getInterface)(uint8_t* interfaceNum);
3333
int (*getDescriptor)(int8_t t);
3434
int8_t numEndpoints;
3535
int8_t numInterfaces;
@@ -51,9 +51,9 @@ class PUSBListNode {
5151
class PluggableUSB_ {
5252
public:
5353
static bool plug(PUSBListNode *node);
54-
static int getInterface(u8* interfaceNum);
54+
static int getInterface(uint8_t* interfaceNum);
5555
static int getDescriptor(int8_t t);
56-
static bool setup(USBSetup& setup, u8 i);
56+
static bool setup(USBSetup& setup, uint8_t i);
5757
};
5858

5959
extern PluggableUSB_ PluggableUSB;

hardware/arduino/avr/libraries/HID/HID.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void HID_::AppendDescriptor(HIDDescriptorListNode *node)
8383
sizeof_hidReportDescriptor += (uint16_t)node->length;
8484
}
8585

86-
void HID_::SendReport(u8 id, const void* data, int len)
86+
void HID_::SendReport(uint8_t id, const void* data, int len)
8787
{
8888
USB_Send(HID.endpoint(), &id, 1);
8989
USB_Send(HID.endpoint() | TRANSFER_RELEASE,data,len);

0 commit comments

Comments
 (0)