This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

error msg

how to solve this error
pwm.c(76): error: #137: expression must be a modifiable lvalue

17 #define left1 IOPIN0 = (1 << 11)

18 #define right1 IOPIN0 = (1 << 8) . . . 74 if(center)

75 return 0;

76 else if(left1 | right1 ) {... ..

Parents
  • You could start by giving some serious thought to whether it is good idea to use actions (like "write this number to this register"), whose value is a constant, as conditions in an if() clause.

    The superficial issue is that your macros lack sufficient parentheses.

Reply
  • You could start by giving some serious thought to whether it is good idea to use actions (like "write this number to this register"), whose value is a constant, as conditions in an if() clause.

    The superficial issue is that your macros lack sufficient parentheses.

Children
No data