We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce2d6e9 commit 9c763baCopy full SHA for 9c763ba
1 file changed
shared-module/audiomixer/Mixer.c
@@ -156,13 +156,21 @@ static inline uint32_t pack8(uint32_t val) {
156
}
157
158
static inline uint32_t copy16lsb(uint32_t val) {
159
+ #if (defined(__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1))
160
+ return __PKHBT(val, val, 16);
161
+ #else
162
val &= 0x0000ffff;
163
return val | (val << 16);
164
+ #endif;
165
166
167
static inline uint32_t copy16msb(uint32_t val) {
168
169
+ return __PKHTB(val, val, 16);
170
171
val &= 0xffff0000;
172
return val | (val >> 16);
173
174
175
176
#define ALMOST_ONE (MICROPY_FLOAT_CONST(32767.) / 32768)
0 commit comments