Hi, I am using the Keil uVision 2 software to develop a firmware driver. I have one technical related to the sbit definitions. Lets say i have couple of sbit definitions as follows: sbit JTAG_TDO = 0xB0+0; sbit ALT_JTAG_TDO = 0x80+0; In the course of program execution, based on some condition I want JTAG_TDO point to the ALT_JTAG_TDO pin so that whatever i write to JTAG_TDO gets written to ALT_JTAG_TDO at the port address 0x80+0 instead of the original 0xB0+0. I tried doing &JTAG_TDO = &ALT_JTAG_TDO and that raised a compiled error. Please let me know how to dynamically change the port pin addressing?
"I was planning to do that indirection only once" Eh?? If you use indirect addressing, then the indirection overhead happens every time you use the indirect address - even if the address is fixed at startup! Remember - you originally said: "I tried doing &JTAG_TDO = &ALT_JTAG_TDO and that raised a compiled error"
The address is fixed at startup and then based on a vendor request it is set to a new one and it will stay way for rest of the program life. After the indirection happens in the vendor request I wll then just use the JTAG_TDO to read and write values in a different function.