summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2020-07-21 16:26:46 -0700
committerScott Shawcroft <scott@tannewt.org>2020-07-22 16:26:46 -0700
commit2bd6d056638f05185eb497ca2d039ebe9f386327 (patch)
treea4e2711f774f400d034d67369212a914faedacea /tools
parentd22283c9c44949242b16fdd4ba4b9d8c55a58add (diff)
Add externs. GCC10 complains about duplicate defines
Diffstat (limited to 'tools')
-rw-r--r--tools/gen_usb_descriptor.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/gen_usb_descriptor.py b/tools/gen_usb_descriptor.py
index 9a8423c32..adec33100 100644
--- a/tools/gen_usb_descriptor.py
+++ b/tools/gen_usb_descriptor.py
@@ -539,14 +539,14 @@ h_file.write("""\
#include <stdint.h>
-const uint8_t usb_desc_dev[{device_length}];
+extern const uint8_t usb_desc_dev[{device_length}];
// Make sure the control buffer is big enough to fit the descriptor.
#define CFG_TUD_ENUM_BUFFER_SIZE {max_configuration_length}
-const uint8_t usb_desc_cfg[{configuration_length}];
-uint16_t usb_serial_number[{serial_number_length}];
-uint16_t const * const string_desc_arr [{string_descriptor_length}];
+extern const uint8_t usb_desc_cfg[{configuration_length}];
+extern uint16_t usb_serial_number[{serial_number_length}];
+extern uint16_t const * const string_desc_arr [{string_descriptor_length}];
-const uint8_t hid_report_descriptor[{hid_report_descriptor_length}];
+extern const uint8_t hid_report_descriptor[{hid_report_descriptor_length}];
#define USB_HID_NUM_DEVICES {hid_num_devices}