Warnings in the op.h code of shruthi?

Hallo…

I had a lot of warnings in the op.h code of shruthi and Atmel Studio 7.

The problem was difference in the operand of inline code.

example not correct: operand. “&=r” (sum)

static inline uint8_t U8Mix(uint8_t a, uint8_t b, uint8_t balance) {
uint16_t sum;
asm(
“mul %3, %2” “\
\\t” // b * balance
"movw %A0, r0" “\
\\t” // to sum
"com %2" “\
\\t” // 255 - balance
"mul %1, %2" “\
\\t” // a * (255 - balance)
“com %2” “\
\\t” // reset balance to its previous value
"add %A0, r0" “\
\\t” // add to sum L
"adc %B0, r1" “\
\\t” // add to sum H
"eor r1, r1" “\
\\t” // reset r1 after multiplication
: “&=r” (sum)
: “a” (a), “a” (balance), “a” (b)
);
return sum;
}

example correct: operand. “=&r” (sum)

static inline uint8_t U8Mix(uint8_t a, uint8_t b, uint8_t balance) {
uint16_t sum;
asm(
“mul %3, %2” “\
\\t” // b * balance
"movw %A0, r0" “\
\\t” // to sum
"com %2" “\
\\t” // 255 - balance
"mul %1, %2" “\
\\t” // a * (255 - balance)
“com %2” “\
\\t” // reset balance to its previous value
"add %A0, r0" “\
\\t” // add to sum L
"adc %B0, r1" “\
\\t” // add to sum H
"eor r1, r1" “\
\\t” // reset r1 after multiplication
"=&r" (sum)
“a” (a), “a” (balance), “a” (b)
);
return sum;
}

I’ve changed it in my code and no more warnings in Atmel Studio7

Greetings from germany.

You’ll probably run into other problems if you try compiling the Shruthi code with Atmel Studio7 anyway (code size).

Hallo Oli

I just wanted to help because of possible errors. I use only a small part of the Shruthi code in my synth.