Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 98c7569

Browse files
committed
export WEAK macro
1 parent 4192a07 commit 98c7569

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

‎libraries/HID/HID.cpp‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ HIDDescriptor _hidInterface;
5151
u8 _hid_protocol = 1;
5252
u8 _hid_idle = 1;
5353

54-
#define WEAK __attribute__ ((weak))
55-
5654
int8_t WEAK HID_GetInterface(u8* interfaceNum)
5755
{
5856
interfaceNum[0] += 1; // uses 1

‎libraries/HID/HID.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ extern const u8 _hidReportDescriptor[] PROGMEM;
7474
// MUST be declared by the module
7575
size_t getsizeof_hidReportDescriptor();
7676

77+
#define WEAK __attribute__ ((weak))
78+
7779
#endif
7880

7981
#endif

‎libraries/MouseAndKeyboard/MouseAndKeyboard.cpp‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#if 1 //defined(USBCON)
22

33
#include "MouseAndKeyboard.h"
4+
#include "HID.h"
45

56
const u8 _hidReportDescriptor[] PROGMEM = {
67

@@ -87,7 +88,7 @@ const u8 _hidReportDescriptor[] PROGMEM = {
8788
};
8889

8990
size_t getsizeof_hidReportDescriptor() {
90-
return sizeof(_hidReportDescriptor);
91+
return sizeof(_hidReportDescriptor);
9192
}
9293

9394
void WEAK setupUSB() {
@@ -316,10 +317,6 @@ const uint8_t _asciimap[128] =
316317
0 // DEL
317318
};
318319

319-
size_t getsizeof_hidReportDescriptor() {
320-
return sizeof(_hidReportDescriptor);
321-
}
322-
323320
uint8_t USBPutChar(uint8_t c);
324321

325322
// press() adds the specified key (printing, non-printing, or modifier)

‎libraries/MouseAndKeyboard/MouseAndKeyboard.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,5 @@ class Keyboard_ : public Print
9494
};
9595
extern Keyboard_ Keyboard;
9696

97+
#endif
9798
#endif

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /