File tree 5 files changed +12
-14
lines changed
arduino-core/src/cc/arduino
hardware/arduino/avr/libraries/HID
5 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -549,13 +549,11 @@ public void message(String s) {
549
549
}
550
550
551
551
if (error .trim ().equals ("'Mouse' was not declared in this scope" )) {
552
- error = tr ("'Mouse' only supported on the Arduino Leonardo" );
553
- //msg = _("\nThe 'Mouse' class is only supported on the Arduino Leonardo.\n\n");
552
+ error = tr ("'Mouse' not found. Have you included \" Mouse.h\" ? Does your board support it?" );
554
553
}
555
554
556
555
if (error .trim ().equals ("'Keyboard' was not declared in this scope" )) {
557
- error = tr ("'Keyboard' only supported on the Arduino Leonardo" );
558
- //msg = _("\nThe 'Keyboard' class is only supported on the Arduino Leonardo.\n\n");
556
+ error = tr ("'Keyboard' not found. Have you included \" Keyboard.h\" ? Does your board support it?" );
559
557
}
560
558
561
559
RunnerException exception = placeException (error , pieces [1 ], PApplet .parseInt (pieces [2 ]) - 1 );
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ int HID_::getDescriptor(USBSetup& setup)
47
47
if (setup.wIndex != pluggedInterface) { return 0 ; }
48
48
49
49
int total = 0 ;
50
- HIDDescriptorListNode * node;
50
+ HIDSubDescriptor * node;
51
51
for (node = rootNode; node; node = node->next ) {
52
52
int res = USB_SendControl (TRANSFER_PGM, node->data , node->length );
53
53
if (res == -1 )
@@ -57,12 +57,12 @@ int HID_::getDescriptor(USBSetup& setup)
57
57
return total;
58
58
}
59
59
60
- void HID_::AppendDescriptor (HIDDescriptorListNode *node)
60
+ void HID_::AppendDescriptor (HIDSubDescriptor *node)
61
61
{
62
62
if (!rootNode) {
63
63
rootNode = node;
64
64
} else {
65
- HIDDescriptorListNode *current = rootNode;
65
+ HIDSubDescriptor *current = rootNode;
66
66
while (current->next ) {
67
67
current = current->next ;
68
68
}
Original file line number Diff line number Diff line change @@ -74,10 +74,10 @@ typedef struct
74
74
EndpointDescriptor in;
75
75
} HIDDescriptor;
76
76
77
- class HIDDescriptorListNode {
77
+ class HIDSubDescriptor {
78
78
public:
79
- HIDDescriptorListNode *next = NULL ;
80
- HIDDescriptorListNode (const void *d, const uint16_t l) : data(d), length(l) { }
79
+ HIDSubDescriptor *next = NULL ;
80
+ HIDSubDescriptor (const void *d, const uint16_t l) : data(d), length(l) { }
81
81
82
82
const void * data;
83
83
const uint16_t length;
@@ -89,7 +89,7 @@ class HID_ : public PluggableUSBModule
89
89
HID_ (void );
90
90
int begin (void );
91
91
void SendReport (uint8_t id, const void * data, int len);
92
- void AppendDescriptor (HIDDescriptorListNode * node);
92
+ void AppendDescriptor (HIDSubDescriptor * node);
93
93
94
94
protected:
95
95
// Implementation of the PluggableUSBModule
@@ -100,7 +100,7 @@ class HID_ : public PluggableUSBModule
100
100
private:
101
101
uint8_t epType[1 ];
102
102
103
- HIDDescriptorListNode * rootNode;
103
+ HIDSubDescriptor * rootNode;
104
104
uint16_t descriptorSize;
105
105
106
106
uint8_t protocol;
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ static const uint8_t _hidReportDescriptor[] PROGMEM = {
62
62
63
63
Keyboard_::Keyboard_ (void )
64
64
{
65
- static HIDDescriptorListNode node (_hidReportDescriptor, sizeof (_hidReportDescriptor));
65
+ static HIDSubDescriptor node (_hidReportDescriptor, sizeof (_hidReportDescriptor));
66
66
HID ().AppendDescriptor (&node);
67
67
}
68
68
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ static const uint8_t _hidReportDescriptor[] PROGMEM = {
62
62
63
63
Mouse_::Mouse_ (void ) : _buttons(0 )
64
64
{
65
- static HIDDescriptorListNode node (_hidReportDescriptor, sizeof (_hidReportDescriptor));
65
+ static HIDSubDescriptor node (_hidReportDescriptor, sizeof (_hidReportDescriptor));
66
66
HID ().AppendDescriptor (&node);
67
67
}
68
68
You can’t perform that action at this time.
0 commit comments