C error : lvalue required as left operand of assignment

I’m getting an error on this line !!! and I guess that my code is correct !
do { REG((PORT_BASE) + GPIO_DIR) &= ~(PIN_MASK); } while(0)
PS: I’m compiling using avr-gcc Thank you in advance.

Beginner Asked on March 15, 2018 in