Hi, As I was in the progress of learning 8051(specifically F340 uC from Silabs) with Keil C51 compiler. I came across this extern variable. This is what happen, hope somebody can enlighten me:
In the USB_HID example -> Blinky project, this variable USB_STATE was defined as unsigned char in F3xx_USB0_InterruptServiceRoutine.c, also in F3xx_USB0_StandardRequests.c this variable was externed, and this two file was part of the Blinky project.
Why not use only one extern variable? How C51 handle this thing? Why the compiler not complaining?
Thanks in advance.
regards gi
Thanks Andy, Yes, I just noticed it, that variable is in 'c' file not placed in the header file. And so it is not in the macro #define so it should not be all capital, per se Thanks for your time in answering my question.
regards gp