mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
add STATIC for local variables
This commit is contained in:
parent
a22cfb2dee
commit
f613c32422
@ -55,12 +55,13 @@
|
||||
- MCU=MCU_LPC43XX
|
||||
- CORE_M4
|
||||
- __CODE_RED
|
||||
- _TINY_USB_SOURCE_FILE_
|
||||
|
||||
#:flags:
|
||||
# :test:
|
||||
# :compile:
|
||||
# :*:
|
||||
# - -std=gnu99
|
||||
# :hid_host:
|
||||
# - -Dstatic=
|
||||
|
||||
# Ceedling defaults to using gcc for compiling, linking, etc.
|
||||
# As [:tools] is blank, gcc will be used (so long as it's in your system path)
|
||||
|
@ -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];
|
||||
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user