1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-26 20:54:22 +01:00

export WEAK macro

This commit is contained in:
Martino Facchin 2015-06-08 14:46:27 +02:00 committed by Cristian Maglie
parent 344896ed70
commit 8f0a433903
4 changed files with 5 additions and 7 deletions

View File

@ -51,8 +51,6 @@ HIDDescriptor _hidInterface;
u8 _hid_protocol = 1;
u8 _hid_idle = 1;
#define WEAK __attribute__ ((weak))
int8_t WEAK HID_GetInterface(u8* interfaceNum)
{
interfaceNum[0] += 1; // uses 1

View File

@ -76,6 +76,8 @@ extern const u8 _hidReportDescriptor[] PROGMEM;
// MUST be declared by the module
size_t getsizeof_hidReportDescriptor();
#define WEAK __attribute__ ((weak))
#endif
#endif

View File

@ -1,6 +1,7 @@
#if 1 //defined(USBCON)
#include "MouseAndKeyboard.h"
#include "HID.h"
const u8 _hidReportDescriptor[] PROGMEM = {
@ -87,7 +88,7 @@ const u8 _hidReportDescriptor[] PROGMEM = {
};
size_t getsizeof_hidReportDescriptor() {
return sizeof(_hidReportDescriptor);
return sizeof(_hidReportDescriptor);
}
void WEAK setupUSB() {
@ -316,10 +317,6 @@ const uint8_t _asciimap[128] =
0 // DEL
};
size_t getsizeof_hidReportDescriptor() {
return sizeof(_hidReportDescriptor);
}
uint8_t USBPutChar(uint8_t c);
// press() adds the specified key (printing, non-printing, or modifier)

View File

@ -95,3 +95,4 @@ public:
extern Keyboard_ Keyboard;
#endif
#endif