Hi,
I'm porting an HID USB mouse example to HI-Tech 8051 ver 9.01 and am getting the error above. I've reduced the code to fit in this post (shows error at 'EP_STATUS[0] = EP_IDLE;' line).
Please use Code tags to maintain formatting and improve code readability. I have added them here. (mod)
Code:
#define EP_IDLE 0x00 // This signifies Endpoint Idle State
#define EP_HALT 0x03 // Endpoint Halt State (return stalls)
unsigned char EP_STATUS[3] = {EP_IDLE, EP_HALT, EP_HALT};
void Usb_Reset (void);
void main (void)
{
Usb_Reset ();
while (1) // Spin forever
{
}
}
void Usb_Reset (void)
{
EP_STATUS[0] = EP_IDLE; // Set default Endpoint Status
EP_STATUS[1] = EP_HALT;
EP_STATUS[2] = EP_HALT;
}
Any help would be greatly appreciated.
Thanks,
Brent
Edited by Dan Henry (Sat Sep 08 2007 01:19 PM)