Question about 8051 'xdata' not 'working' ... | Cypress Semiconductor
Question about 8051 'xdata' not 'working' ...
I'm making a small modification to a project that appears to use various global variables declared as 'xdata'.
I added my own variable, that I return on an IN endpoint:
xdata BYTE test;
test = 0xAB;
EP1INBUF = test;
EP1INBC = 1;
If my windows app reads this endpoint, it reads the value '0'.
However, if I remove the 'xdata' declaration, my windows app DOES actually read '0xAB'.
What is going on here, and how do I make 'xdata' work? (This is stripped down code to show the issue, I need 'xdata' because I want to use EZUSB EEPROM routines that have 'BYTE xdata *dat' arguments.
~ Paul Claessen