Tool/software: TI C/C++ Compiler
What is the difference between GpioCtrlRegs and GpioG1CtrlRegs? Which one should I use and how would I know which one to use?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI C/C++ Compiler
What is the difference between GpioCtrlRegs and GpioG1CtrlRegs? Which one should I use and how would I know which one to use?
Erik,
GpioCtrlRegs and GpioG1CtrlRegs are identical, as you can see they are defined by the same struct.
They are also assigned to the same memory address in the nonBIOS.cmd file.
UNION run = GPIOG1CTRL, PAGE = 1 { GpioCtrlRegsFile GpioG1CtrlRegsFile } UNION run = GPIOG1DAT, PAGE = 1 { GpioDataRegsFile GpioG1DataRegsFile } UNION run = GPIOG1TRIP, PAGE = 1 { GpioTripRegsFile GpioG1TripRegsFile }
You can use either struct whenever you like. I do not have a good reason why the GPIO registers were split into two structures GpioG1 and GpioG2. However I do suspect that GpioCtrlRegs was kept for backwards compatibility purposes so that a customer could directly reuse existing source code.
Regards,
Cody