From 2bd6d056638f05185eb497ca2d039ebe9f386327 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 21 Jul 2020 16:26:46 -0700 Subject: Add externs. GCC10 complains about duplicate defines --- tools/gen_usb_descriptor.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tools') 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 -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} -- cgit v1.2.3