Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change lib8tion library to be usable in user keymaps #5598

Merged
merged 5 commits into from
Apr 30, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ ifeq ($(strip $(CIE1931_CURVE)), yes)
LED_TABLES = yes
endif



ifeq ($(strip $(LED_BREATHING_TABLE)), yes)
OPT_DEFS += -DUSE_LED_BREATHING_TABLE
LED_TABLES = yes
Expand Down Expand Up @@ -291,6 +293,8 @@ endif

include $(DRIVER_PATH)/qwiic/qwiic.mk

QUANTUM_LIB_SRC += $(LIB_PATH)/lib8tion/lib8tion.c
drashna marked this conversation as resolved.
Show resolved Hide resolved

QUANTUM_SRC:= \
$(QUANTUM_DIR)/quantum.c \
$(QUANTUM_DIR)/keymap_common.c \
Expand Down
1 change: 1 addition & 0 deletions lib/lib8tion/lib8tion.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#define RAND16_SEED 1337
uint16_t rand16seed = RAND16_SEED;

const uint8_t b_m16_interleave[8] = { 0, 49, 49, 41, 90, 27, 117, 10 };

// memset8, memcpy8, memmove8:
// optimized avr replacements for the standard "C" library
Expand Down
2 changes: 1 addition & 1 deletion lib/lib8tion/trig8.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ LIB8STATIC int16_t cos16( uint16_t theta)
#endif


const uint8_t b_m16_interleave[] = { 0, 49, 49, 41, 90, 27, 117, 10 };
extern const uint8_t b_m16_interleave[8];

/// Fast 8-bit approximation of sin(x). This approximation never varies more than
/// 2% from the floating point value you'd get by doing
Expand Down