| XGCONFIG disabling form input [message #952697] |
Sun, 21 October 2012 14:00  |
James Lockwood Messages: 13 Registered: July 2009 |
Junior Member |
|
|
I have created a somewhat complicated form for setting pinmux settings. I have attached a screen shot to illustrate what I am doing.
In a listbox, I have a list of ports that can be selected. Each port bit has specific settings that can be selected from various droplist controls that give the allowable options. Since each port and bit have specific options, I have declared this in my .xdc file.
metaonly config Any Ports[string];
in my .cfg file, I do this:
PinProfile_INIT.Ports["PORT_A"] = new PinProfile_INIT.PortA();
PinProfile_INIT.Ports["PORT_B"] = new PinProfile_INIT.PortB();
PinProfile_INIT.Ports["PORT_D"] = new PinProfile_INIT.PortD();
PinProfile_INIT.Ports["PORT_E"] = new PinProfile_INIT.PortE();
PinProfile_INIT.Ports["PORT_F"] = new PinProfile_INIT.PortF();
PinProfile_INIT.Ports["PORT_G"] = new PinProfile_INIT.PortG();
PinProfile_INIT.Ports["PORT_H"] = new PinProfile_INIT.PortH();
PinProfile_INIT.Ports["PORT_J"] = new PinProfile_INIT.PortJ();
PinProfile_INIT.Ports["PORT_C"] = new PinProfile_INIT.PortC();
PinProfile_INIT.mapPortBitsToGpio();
mapPortBitsToGpio() function has statements like this:
this.Ports["PORT_A"].baseIndex = IPortBaseRegs.PORT_A_INDEX;
this.Ports["PORT_A"].baseAddress = IPortBaseRegs.PORT_A_BASE;
this.Ports["PORT_A"].bit0 = this.gpio0;
this.Ports["PORT_A"].bit1 = this.gpio1;
this.Ports["PORT_A"].bit2 = this.gpio2;
this.Ports["PORT_A"].bit3 = this.gpio3;
this.Ports["PORT_A"].bit4 = this.gpio4;
this.Ports["PORT_A"].bit5 = this.gpio5;
this.Ports["PORT_A"].bit6 = this.gpio6;
this.Ports["PORT_A"].bit7 = this.gpio7;
This all works, but I would like to put the first lines of code into the mapPortBitsToGpio function, or ideally the whole thing into the module$meta$init function so it is not necessary for the user to add these lines into the .cfg file at all.
However, when I do that, the controls on the screen are disabled and faded.
Can anyone provide insight into what I would have to do to re-enable the controls?
|
|
|