Could someone please help me understand how this works...
Defined in a header file:
And in the program:
I know it sets registers in my ethernet controller(this is just a small part).
Since I want to change some settings of the ethernet ctrl I need to make some changes to this code, but I dont really get how this works. Particullary the "|" sign, what does it do?
TIA
Mojaffa
Defined in a header file:
Code:
#define ETHCTRL (*(IORegExt8)(IOBASE + 0))
#define ETHWRITE (*(IORegExt8)(IOBASE + 1))
Code:
ETHCTRL = R_CR | R_NONE;
ETHWRITE = 0x00;
ETHCTRL = R_CR | (R_WR_OE & R_IOWR);
Since I want to change some settings of the ethernet ctrl I need to make some changes to this code, but I dont really get how this works. Particullary the "|" sign, what does it do?
TIA
Mojaffa