mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +03:00
CF new LED strip port
Requires configurator update. LED strip Cleanup. New LED functions: - GPS (G) - Battery (L) - RSSI (S) - Larson Scanner (O) - Blink (B) - Blink on landing (N) Mode colors and special colors are configurable (mode_color in CLI, MSP_LED_STRIP_MODECOLOR & MSP_SET_LED_STRIP_MODECOLOR)
This commit is contained in:
parent
128a370508
commit
aab0a56068
11 changed files with 1132 additions and 829 deletions
|
@ -71,4 +71,15 @@ http://resnet.uoregon.edu/~gurney_j/jmpc/bitwise.html
|
|||
static inline int16_t cmp16(uint16_t a, uint16_t b) { return a-b; }
|
||||
static inline int32_t cmp32(uint32_t a, uint32_t b) { return a-b; }
|
||||
|
||||
// using memcpy_fn will force memcpy function call, instead of inlining it. In most cases function call takes fewer instructions
|
||||
// than inlined version (inlining is cheaper for very small moves < 8 bytes / 2 store instructions)
|
||||
#ifdef UNIT_TEST
|
||||
// Call memcpy when building unittest - this is easier that asm symbol name mangling (symbols start with _underscore on win32)
|
||||
#include <string.h>
|
||||
static inline void memcpy_fn ( void * destination, const void * source, size_t num ) { memcpy(destination, source, num); };
|
||||
#else
|
||||
void * memcpy_fn ( void * destination, const void * source, size_t num ) asm("memcpy");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue