>> void ft2232_tms(int bits, char tms)
>> {
>>        MYTRACE("ft2232_tms(%d, 0x%02x)", bits, (quint8)tms);
>>        for (int i=0; i<bits; i++) {
>>                bool t = tms & (1 << i);
>>                current_state = tap_state_transition(current_state, t);
>>                MYVERBOSE("  tms %d, advance to %s %d", t, 
>> tap_state_name(current_state), current_state);
>>        }
>>        ft2232_buffer.append(0x4b);
>>        ft2232_buffer.append(bits-1);
>>        ft2232_buffer.append(tms);
>> }
>>
>>     


1)  A bad assumption is made in the above code that the number of bits 
is 7 or less.  The above code should be changed to work with more than 7 
bits or at least report the error if bits argument is greater than 7. 

2) current_state is no longer usable like above.  Use tap_set_state().


3) It is good that when using tap_set_state() there will be state 
tracking/logging through ALL states, not just the endpoints of a 
multi-state move.  i.e. this one is an attaboy.


Dick

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to