summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorroot <siehputz@gmail.com>2020-07-24 23:28:41 -0500
committerroot <siehputz@gmail.com>2020-07-24 23:28:41 -0500
commitc4817968eee29257cbeaabace0a29fcbed1c3b47 (patch)
tree25108d321af3697e608270872e59b5aec2043cc5 /tools
parentd9503e579b72d8bad6f556589da50ba9833b4574 (diff)
parent3dfed3c4aa52d06bd2eb1c28d0a1916821cc3f80 (diff)
Merge branch 'opt-test' of https://github.com/DavePutz/circuitpython into opt-test
Diffstat (limited to 'tools')
-rw-r--r--tools/extract_pyi.py4
-rw-r--r--tools/gen_usb_descriptor.py10
2 files changed, 9 insertions, 5 deletions
diff --git a/tools/extract_pyi.py b/tools/extract_pyi.py
index e5da61035..ab223877e 100644
--- a/tools/extract_pyi.py
+++ b/tools/extract_pyi.py
@@ -2,6 +2,10 @@
#
# SPDX-License-Identifier: MIT
+# Run with 'python tools/extract_pyi.py shared-bindings/ path/to/stub/dir
+# You can also test a specific library in shared-bindings by putting the path
+# to that directory instead
+
import ast
import os
import re
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}