diff options
| author | hathach <[email protected]> | 2013-01-27 13:16:30 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-01-27 13:16:30 +0700 |
| commit | f613c32422a9b1815785d38427d3096a97bd3457 (patch) | |
| tree | 3fe73f5f4d3222d03f26e906399c59bdff137e4b /tinyusb | |
| parent | a22cfb2dee31e437ca43351e705b60e143f169d6 (diff) | |
add STATIC for local variables
Diffstat (limited to 'tinyusb')
| -rw-r--r-- | tinyusb/class/hid_host.c | 2 | ||||
| -rw-r--r-- | tinyusb/common/common.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/tinyusb/class/hid_host.c b/tinyusb/class/hid_host.c index a22c97407..645d60ac0 100644 --- a/tinyusb/class/hid_host.c +++ b/tinyusb/class/hid_host.c @@ -53,7 +53,7 @@ //--------------------------------------------------------------------+ // INTERNAL OBJECT & FUNCTION DECLARATION //--------------------------------------------------------------------+ -class_hid_keyboard_info_t keyboard_info_pool[TUSB_CFG_HOST_DEVICE_MAX]; +STATIC_ class_hid_keyboard_info_t keyboard_info_pool[TUSB_CFG_HOST_DEVICE_MAX]; //--------------------------------------------------------------------+ diff --git a/tinyusb/common/common.h b/tinyusb/common/common.h index 769cd7139..5a429ac91 100644 --- a/tinyusb/common/common.h +++ b/tinyusb/common/common.h @@ -73,6 +73,12 @@ #include "core/std_descriptors.h" #include "osal/osal.h" +// TODO try to manipulate gcc cmd option instead +#ifndef _TEST_ + #define STATIC_ static +#else + #define STATIC_ +#endif /// form an uint32_t from 4 x uint8_t static inline uint32_t u32_from_u8(uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4) ATTR_ALWAYS_INLINE ATTR_CONST; |
