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.

GUI composer pushbutton bidirectional binding question

Hello,

I'm getting some curious behavior with the pushbuttons in guicomoser. ( gc.dijit.ToggleButton #widget)

If I have a button bound to a bit field of a variable and I set it by pushing the button, the value does change to a 1  as expected. If I now reset the bit field to a zero in the program this doesn't seem to get back to the GUI composer button so that you effectively end up having to push the button twice to reinitiate the event. So it seems the pushbutton is not "seeing" the value being posted by the program.

Any thoughts? 

  • I can't reproduce this, I have simple application as the following.

    typedef struct S {
        unsigned char b1 : 1;
        unsigned char b2 : 1;
        unsigned char b3 : 1;
    } ss;
    
    volatile ss s;
    
    int main(void) {
    	while (1) {
    		s.b2 = 1;
    		s.b2 = 0;
    	}
    	return 0;
    }

    And binded the toggle button to s.b2. I see the variable s.b2 change in the expressions view inside CCS. And when s.b2 changed, the toggle button is also updated. 

    Regards,
    Patrick