"lvalue required as left operand of assignment" When Writing to GPIO_REGs
Posted: Sat May 13, 2017 6:04 pm
Hello!
I am trying to make code for an 8080 parallel connection.
I've run into a problem very early though!
Attempting to edit the register "GPIO_OUT_REG," which, in the technical datasheet is listed as R/W capable, throws an error:
("readLoc" is a byte* pointing to the address of a uint16_t[128*128], but that's not the error here. And yes, it has been reinterpret_casted. Even writing a static value does not work.)
<Speculation>
In one of the attempts, it showed me that GPIO_OUT_REG is #defined relative to another variable:
This is an issue for assignment of the variable, I'm pretty sure!
</Speculation>
I am trying to make code for an 8080 parallel connection.
I've run into a problem very early though!
Attempting to edit the register "GPIO_OUT_REG," which, in the technical datasheet is listed as R/W capable, throws an error:
Code: Select all
sketch_may13a:19: error: lvalue required as left operand of assignment
GPIO_OUT_REG|= 0b11000000000|(*readLoc);//Enable write and chip, write data
<Speculation>
In one of the attempts, it showed me that GPIO_OUT_REG is #defined relative to another variable:
Code: Select all
#define GPIO_OUT_REG (DR_REG_GPIO_BASE + 0x0004)
</Speculation>