On Tue, Oct 19, 2010 at 9:12 PM, Mike Frysinger <[email protected]> wrote: >> --- src/tap/cable_list.h (wersja 1862) >> +++ src/tap/cable_list.h (kopia robocza) >> --- src/tap/cable/generic_usbconn_list.h (wersja 1862) >> +++ src/tap/cable/generic_usbconn_list.h (kopia robocza) > keep the list sorted at least within itself (the ft2232 cables)
ktlink is just after usbscarab2. >> -/* --- Bit and bitmask definitions for usbScarab2 --- */ >> -/* usbScarabeus2 is a design of Krzysztof Kajstura ( http://www.kristech.eu > ). */ >> -/* UrJTAG support added by Tomek Cedro ( http://www.tomek.cedro.info ) */ >> -/* as a part of work for TP R&D (Polish Telecom, FT/Orange Group) > http://www.tp.pl */ > drop the new trailing tabs. if you want to extend the TP R&D info, the do > only that. done. >> +/* bit and mask definitions for KT-LINK (FT2232H based, SWD-ready) */ >> +/* KT-LINK is a design of Krzysztof Kajstura (http://www.kristech.eu) >> */ >> +/* UrJTAG support added by Tomek Cedro (http://www.tomek.cedro.info) */ >> +/* As part of work for TP R&D/Orange Labs Warsaw - Orange Labs Paris >> */ > dont use tabs at the end. just use one space before the end of the comment. > there are other places in this patch which need fixing. removed trailing tabs, replaced inside tabs with spaces, other comments have 1in/out space. >> +#define BIT_KTLINK_nTCKen 6 // aCbus > please scan your changes for trailing whitespace. there shouldnt be. done. >> +//Mask is 8bit, aDbus sent with SET_BITS_LOW, aCbus with SET_BITS_HIGH > > use /* C style comments */ done. >> +#define BITMASK_KTLINK_nTCKen (1 << BIT_KTLINK_nTCKen) > use spaces for indentation ... not tabs right. >> + params_t *params = (params_t *) cable->params; > drop the useless cast not sure of that - everywhere in the code this syntax is used, so i dont want to mess with casting. >> + urj_tap_cable_cx_cmd_root_t *cmd_root = &(params->cmd_root); > no need for the paranethesis. applies to multiple places in the patch. again, used code from other code sections. >> + if ((urj_tap_cable_cx_xfer_recv (cable) & BITMASK_KTLINK_SRSTin) == 0) >> + { >> + urj_log (URJ_LOG_LEVEL_NORMAL, "SRST pin state is low. Active?\n"); >> + } else { >> + urj_log (URJ_LOG_LEVEL_NORMAL, "SRST pin state is high...\n"); >> + } > > uncuddle the parentheses: > if (...) > { > ... > } > else > { > ... > } done >> + params->low_byte_value = 0; >> + params->low_byte_value |= BITMASK_TMS; >> + params->low_byte_value |= BITMASK_KTLINK_TMSDOsel ; > no need for multiple assignments. just do it once. this is more readable as the one assignment would make code multiline and messy. this is common practice to set bitmasks this way, no need to spare some few bytes. > and no space before the semicolon. btw. why do you use function parse "function ()" instead "function()" ? The patch should be fine now, if not please edit parse as you like, here it goes :-) Regads, Tomek -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
ktlink201010192235.patch
Description: Binary data
------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________ UrJTAG-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/urjtag-development
