summaryrefslogtreecommitdiff
path: root/shared-module
diff options
context:
space:
mode:
authorDan Halbert <halbert@adafruit.com>2019-09-09 22:43:49 -0400
committerGitHub <noreply@github.com>2019-09-09 22:43:49 -0400
commit2b560015c9e0874c4f320ccb039b4e1197437bdb (patch)
tree9f8d5c343a827d38ec7a8f68429e7aef1e4ec730 /shared-module
parent4282ff42ca543c1a3f00bf69734dca55b22ac217 (diff)
parent8768896d6b0ddb35568ad996781a33fd3a0df94f (diff)
Merge pull request #2129 from jepler/audiomixer-debugging
audiomixer: Supply constants in a way "-Og" optimization expects
Diffstat (limited to 'shared-module')
-rw-r--r--shared-module/audiomixer/Mixer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shared-module/audiomixer/Mixer.c b/shared-module/audiomixer/Mixer.c
index e0fb4fab8..a52489f85 100644
--- a/shared-module/audiomixer/Mixer.c
+++ b/shared-module/audiomixer/Mixer.c
@@ -262,8 +262,8 @@ static inline uint32_t mult16signed(uint32_t val, int32_t mul) {
}
#if (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) //Cortex-M4 w/FPU
int32_t hi, lo;
- int32_t bits = 16; // saturate to 16 bits
- int32_t shift = 0; // shift is done automatically
+ enum { bits = 16 }; // saturate to 16 bits
+ enum { shift = 0 }; // shift is done automatically
asm volatile("smulwb %0, %1, %2" : "=r" (lo) : "r" (mul), "r" (val));
asm volatile("smulwt %0, %1, %2" : "=r" (hi) : "r" (mul), "r" (val));
asm volatile("ssat %0, %1, %2, asr %3" : "=r" (lo) : "I" (bits), "r" (lo), "I" (shift));