tinyusb  0.4
Click here to lend your support to tinyusb donation and make a donation at pledgie.com
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Function Attributes

Macros

#define ATTR_ALWAYS_INLINE   __attribute__ ((always_inline))
 Generally, functions are not inlined unless optimization is specified. For functions declared inline, this attribute inlines the function even if no optimization level is specified.
 
#define ATTR_NON_NULL   __attribute__ ((nonull))
 The nonnull attribute specifies that some function parameters should be non-null pointers. f the compiler determines that a null pointer is passed in an argument slot marked as non-null, and the -Wnonnull option is enabled, a warning is issued. All pointer arguments are marked as non-null.
 
#define ATTR_PURE   __attribute__ ((pure))
 Many functions have no effects except the return value and their return value depends only on the parameters and/or global variables. Such a function can be subject to common subexpression elimination and loop optimization just as an arithmetic operator would be. These functions should be declared with the attribute pure.
 
#define ATTR_CONST   __attribute__ ((const))
 Many functions do not examine any values except their arguments, and have no effects except the return value. Basically this is just slightly more strict class than the pure attribute below, since function is not allowed to read global memory. Note that a function that has pointer arguments and examines the data pointed to must not be declared const. Likewise, a function that calls a non-const function usually must not be const. It does not make sense for a const function to return void.
 
#define ATTR_DEPRECATED   __attribute__ ((deprecated))
 The deprecated attribute results in a warning if the function is used anywhere in the source file. This is useful when identifying functions that are expected to be removed in a future version of a program. The warning also includes the location of the declaration of the deprecated function, to enable users to easily find further information about why the function is deprecated, or what they should do instead. Note that the warnings only occurs for uses.
 
#define ATTR_DEPRECATED_MESS(mess)   __attribute__ ((deprecated(mess)))
 Same as the deprecated attribute with optional message in the warning.
 
#define ATTR_WEAK   __attribute__ ((weak))
 The weak attribute causes the declaration to be emitted as a weak symbol rather than a global. This is primarily useful in defining library functions that can be overridden in user code.
 
#define ATTR_ALIAS(func)   __attribute__ ((alias(#func)))
 The alias attribute causes the declaration to be emitted as an alias for another symbol, which must be specified.
 
#define ATTR_WEAKREF(func)   __attribute__ ((weakref(#func)))
 The weakref attribute marks a declaration as a weak reference. It is equivalent with weak + alias attribute, but require function is static.
 
#define ATTR_WARN_UNUSED_RESULT   __attribute__ ((warn_unused_result))
 The warn_unused_result attribute causes a warning to be emitted if a caller of the function with this attribute does not use its return value. This is useful for functions where not checking the result is either a security problem or always a bug.
 
#define ATTR_USED   __attribute__ ((used))
 This attribute, attached to a function, means that code must be emitted for the function even if it appears that the function is not referenced. This is useful, for example, when the function is referenced only in inline assembly.
 
#define ATTR_UNUSED   __attribute__ ((unused))
 This attribute, attached to a function, means that the function is meant to be possibly unused. GCC does not produce a warning for this function.
 

Detailed Description