Pavel Chromy style fixes.

git-svn-id: svn://svn.berlios.de/openocd/trunk@344 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe 2008-02-25 14:58:20 +00:00
parent 81184adfb0
commit a08d86e88d
3 changed files with 1147 additions and 1148 deletions

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* Copyright (C) 2006 by Magnus Lundin * * Copyright (C) 2006 by Magnus Lundin *
* lundin@mlu.mine.nu * * lundin@mlu.mine.nu *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *

View File

@ -1,14 +1,14 @@
/*************************************************************************** /***************************************************************************
* Copyright (C) 2007 by Benedikt Sauter sauter@ixbat.de * * Copyright (C) 2007 by Benedikt Sauter sauter@ixbat.de *
* based on Dominic Rath's amt_jtagaccel.c * * based on Dominic Rath's amt_jtagaccel.c *
* * * *
* usbprog is a free programming adapter. You can easily install * * usbprog is a free programming adapter. You can easily install *
* different firmware versions from an "online pool" over USB. * * different firmware versions from an "online pool" over USB. *
* The adapter can be used for programming and debugging AVR and ARM * * The adapter can be used for programming and debugging AVR and ARM *
* processors, as USB to RS232 converter, as JTAG interface or as * * processors, as USB to RS232 converter, as JTAG interface or as *
* simple I/O interface (5 lines). * * simple I/O interface (5 lines). *
* * * *
* http://www.embedded-projects.net/usbprog * * http://www.embedded-projects.net/usbprog *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
@ -25,7 +25,6 @@
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/ ***************************************************************************/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif
@ -470,11 +469,11 @@ void usbprog_jtag_init(struct usbprog_jtag *usbprog_jtag)
void usbprog_jtag_write_and_read(struct usbprog_jtag *usbprog_jtag, char * buffer, int size) void usbprog_jtag_write_and_read(struct usbprog_jtag *usbprog_jtag, char * buffer, int size)
{ {
char tmp[64]; // fastes packet size for usb controller char tmp[64]; /* fastes packet size for usb controller */
int send_bits, bufindex = 0, fillindex = 0, i, loops; int send_bits, bufindex = 0, fillindex = 0, i, loops;
char swap; char swap;
// 61 byte can be transfered (488 bit) /* 61 byte can be transfered (488 bit) */
while (size > 0) while (size > 0)
{ {
@ -492,8 +491,8 @@ void usbprog_jtag_write_and_read(struct usbprog_jtag *usbprog_jtag, char * buffe
size = 0; size = 0;
} }
tmp[0] = WRITE_AND_READ; tmp[0] = WRITE_AND_READ;
tmp[1] = (char)(send_bits >> 8); // high tmp[1] = (char)(send_bits >> 8); /* high */
tmp[2] = (char)(send_bits); // low tmp[2] = (char)(send_bits); /* low */
i = 0; i = 0;
for (i = 0; i < loops; i++) for (i = 0; i < loops; i++)
@ -525,11 +524,11 @@ void usbprog_jtag_write_and_read(struct usbprog_jtag *usbprog_jtag, char * buffe
void usbprog_jtag_read_tdo(struct usbprog_jtag *usbprog_jtag, char * buffer, int size) void usbprog_jtag_read_tdo(struct usbprog_jtag *usbprog_jtag, char * buffer, int size)
{ {
char tmp[64]; // fastes packet size for usb controller char tmp[64]; /* fastes packet size for usb controller */
int send_bits, fillindex = 0, i, loops; int send_bits, fillindex = 0, i, loops;
char swap; char swap;
// 61 byte can be transfered (488 bit) /* 61 byte can be transfered (488 bit) */
while (size > 0) while (size > 0)
{ {
@ -547,8 +546,8 @@ void usbprog_jtag_read_tdo(struct usbprog_jtag *usbprog_jtag, char * buffer, int
size = 0; size = 0;
} }
tmp[0] = WRITE_AND_READ; tmp[0] = WRITE_AND_READ;
tmp[1] = (char)(send_bits >> 8); // high tmp[1] = (char)(send_bits >> 8); /* high */
tmp[2] = (char)(send_bits); // low tmp[2] = (char)(send_bits); /* low */
usb_bulk_write(usbprog_jtag->usb_handle, 3, tmp, 3, 1000); usb_bulk_write(usbprog_jtag->usb_handle, 3, tmp, 3, 1000);
@ -572,10 +571,10 @@ void usbprog_jtag_read_tdo(struct usbprog_jtag *usbprog_jtag, char * buffer, int
void usbprog_jtag_write_tdi(struct usbprog_jtag *usbprog_jtag, char * buffer, int size) void usbprog_jtag_write_tdi(struct usbprog_jtag *usbprog_jtag, char * buffer, int size)
{ {
char tmp[64]; // fastes packet size for usb controller char tmp[64]; /* fastes packet size for usb controller */
int send_bits, bufindex = 0, i, loops; int send_bits, bufindex = 0, i, loops;
// 61 byte can be transfered (488 bit) /* 61 byte can be transfered (488 bit) */
while (size > 0) while (size > 0)
{ {
if (size > 488) if (size > 488)
@ -593,8 +592,8 @@ void usbprog_jtag_write_tdi(struct usbprog_jtag *usbprog_jtag, char * buffer, in
size = 0; size = 0;
} }
tmp[0] = WRITE_TDI; tmp[0] = WRITE_TDI;
tmp[1] = (char)(send_bits >> 8); // high tmp[1] = (char)(send_bits >> 8); /* high */
tmp[2] = (char)(send_bits); // low tmp[2] = (char)(send_bits); /* low */
i = 0; i = 0;
for (i = 0; i < loops; i++) for (i = 0; i < loops; i++)