fixes for function prototypes and missing includes (Hartley)

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@867 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 17 years ago
parent ec5bbbe88e
commit ea79dff446

@ -1,3 +1,8 @@
2007-12-19 Kolja Waschk <kawk>
* tap/cable/*, tap/parport/xpcu_common.c, cmd/part.c, cmd/cable.c,
bus/pxa2x0.c, jtag.c: fix prototypes, include stdlib (thx Hartley)
2007-12-18 Kolja Waschk <kawk
* configure.ac, src/tap/parport/*.c: include stropts.h only if

@ -194,14 +194,14 @@ pxa27x_bus_printinfo( bus_t *bus )
printf( _("Intel PXA27x compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
static void
static int
pxa2xx_bus_init( bus_t *bus )
{
chain_t *chain = CHAIN;
part_t *p = PART;
if (INITED == 1)
return;
return 0;
part_set_instruction( p, "SAMPLE/PRELOAD" );
chain_shift_instructions( chain );
@ -226,12 +226,14 @@ pxa2xx_bus_init( bus_t *bus )
chain_shift_instructions( chain );
INITED = 1;
return 0;
}
static void
pxa2xx_bus_prepare( bus_t *bus )
{
pxa2xx_bus_init( bus );
(void)pxa2xx_bus_init( bus );
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
@ -406,7 +408,7 @@ pxa2xx_bus_area( bus_t *bus, uint32_t adr, bus_area_t *area )
{
uint32_t tmp_addr;
int ncs_index;
pxa2xx_bus_init( bus );
(void)pxa2xx_bus_init( bus );
/* Static Chip Select 0 (64 MB) */
if (adr < UINT32_C(0x04000000)) {
@ -493,7 +495,7 @@ pxa27x_bus_area( bus_t *bus, uint32_t adr, bus_area_t *area )
{
uint32_t tmp_addr;
int ncs_index;
pxa2xx_bus_init( bus );
(void)pxa2xx_bus_init( bus );
/* Static Chip Select 0 (64 MB) */
if (adr < UINT32_C(0x04000000)) {

@ -26,6 +26,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "parport.h"
#include "tap.h"

@ -26,6 +26,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "jtag.h"

@ -330,9 +330,9 @@ cleanup( void )
}
int
main( int argc, const char **argv )
main( int argc, char *const argv[] )
{
int go;
int go = 0;
int i;
int c;
int norc = 0;

@ -467,7 +467,7 @@ ft2232_transfer( cable_t *cable, int len, char *in, char *out )
}
void
ft2232_usbcable_help(char *cablename)
ft2232_usbcable_help( const char *cablename )
{
printf( _(
"Usage: cable %s ftdi-mpsse VID:PID\n"

@ -125,7 +125,7 @@ generic_get_trst( cable_t *cable )
}
void
generic_lptcable_help( char *cablename )
generic_lptcable_help( const char *cablename )
{
printf( _(
"Usage: cable %s parallel PORTADDR\n"

@ -42,6 +42,6 @@ void generic_cable_free( cable_t *cable );
void generic_done( cable_t *cable );
int generic_transfer( cable_t *cable, int len, char *in, char *out );
int generic_get_trst( cable_t *cable );
void generic_lptcable_help( char *name );
void generic_lptcable_help( const char *name );
#endif /* GENERIC_H */

@ -121,5 +121,5 @@ cable_driver_t keithkoep_cable_driver = {
generic_transfer,
keithkoep_set_trst,
generic_get_trst,
generic_lptcable_help,
generic_lptcable_help
};

@ -118,5 +118,5 @@ cable_driver_t mpcbdm_cable_driver = {
generic_transfer,
mpcbdm_set_trst,
generic_get_trst,
generic_lptcable_help,
generic_lptcable_help
};

@ -123,5 +123,5 @@ cable_driver_t triton_cable_driver = {
generic_transfer,
triton_set_trst,
generic_get_trst,
generic_lptcable_help,
generic_lptcable_help
};

@ -164,7 +164,7 @@ usbblaster_transfer( cable_t *cable, int len, char *in, char *out )
}
void
usbblaster_help(char *cablename)
usbblaster_help( const char *cablename )
{
printf( _(
"Usage: cable %s ftdi VID:PID\n"

@ -120,7 +120,8 @@ cable_driver_t wiggler_cable_driver = {
wiggler_get_tdo,
generic_transfer,
wiggler_set_trst,
generic_get_trst
generic_get_trst,
generic_lptcable_help
};
cable_driver_t igloo_cable_driver = {
@ -136,6 +137,6 @@ cable_driver_t igloo_cable_driver = {
generic_transfer,
wiggler_set_trst,
generic_get_trst,
generic_lptcable_help,
generic_lptcable_help
};

@ -128,5 +128,5 @@ cable_driver_t wiggler2_cable_driver = {
generic_transfer,
wiggler2_set_trst,
generic_get_trst,
generic_lptcable_help,
generic_lptcable_help
};

@ -95,7 +95,7 @@ xpc_set_trst( cable_t *cable, int trst )
}
void
xpcu_usbcable_help(char *cablename)
xpcu_usbcable_help( const char *cablename )
{
printf( _(
"Usage: cable %s xpcu VID:PID\n"
@ -122,12 +122,6 @@ cable_driver_t xpc_int_cable_driver = {
xpcu_usbcable_help
};
void
xpc_ext_usbcable_help()
{
xpcu_usbcable_help("xpc_ext");
}
cable_driver_t xpc_ext_cable_driver = {
"xpc_ext",
N_("Xilinx Platform Cable USB external chain"),

@ -151,7 +151,7 @@ int xpcu_write_gpio(struct usb_dev_handle *xpcu, uint8_t bits)
int xpcu_read_gpio(struct usb_dev_handle *xpcu, uint8_t *bits)
{
if(usb_control_msg(xpcu, 0xC0, 0xB0, 0x0038, 0, bits, 1, 1000)<0)
if(usb_control_msg(xpcu, 0xC0, 0xB0, 0x0038, 0, (char*)bits, 1, 1000)<0)
{
perror("usb_control_msg(0x38.0x00) (read port E)");
return -1;

Loading…
Cancel
Save