summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSven Wegener <sven.wegener@stealer.net>2014-11-05 21:02:40 +0100
committerDamien George <damien.p.george@gmail.com>2014-11-05 22:52:51 +0000
commit0e0ae97975014b82f8d17c5268ee4d1d4a640d84 (patch)
tree0ce2dbbee7f6435a19dbae6cb4b01edfa7d666f3
parent1a5a6d14031b05b6487bd0b2f37958e2ceaace43 (diff)
downloadmicropython-0e0ae97975014b82f8d17c5268ee4d1d4a640d84.tar.gz
micropython-0e0ae97975014b82f8d17c5268ee4d1d4a640d84.zip
stmhal: Declare variables extern in include files
Else we end up with several instances of the variable. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
-rw-r--r--stmhal/file.h2
-rw-r--r--stmhal/usb.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/file.h b/stmhal/file.h
index 7522a337dc..f21ec6dab6 100644
--- a/stmhal/file.h
+++ b/stmhal/file.h
@@ -24,6 +24,6 @@
* THE SOFTWARE.
*/
-const byte fresult_to_errno_table[20];
+extern const byte fresult_to_errno_table[20];
MP_DECLARE_CONST_FUN_OBJ(mp_builtin_open_obj);
diff --git a/stmhal/usb.h b/stmhal/usb.h
index 594e99e18d..168bfbd5fe 100644
--- a/stmhal/usb.h
+++ b/stmhal/usb.h
@@ -41,7 +41,7 @@ typedef enum {
USB_STORAGE_MEDIUM_SDCARD,
} usb_storage_medium_t;
-const mp_obj_type_t pyb_usb_vcp_type;
+extern const mp_obj_type_t pyb_usb_vcp_type;
void pyb_usb_init0(void);
void pyb_usb_dev_init(usb_device_mode_t mode, usb_storage_medium_t medium);