libftdi: Clean up warnings.

This commit is contained in:
Gareth McMullin 2013-04-16 12:28:06 -07:00
parent da448ec1a6
commit 67a96410e3
5 changed files with 15 additions and 6 deletions

View File

@ -1,2 +1,2 @@
CFLAGS += -DLIBFTDI
CFLAGS += -DLIBFTDI -Wno-format
LDFLAGS += -lftdi -lusb

View File

@ -108,7 +108,9 @@ unsigned char gdb_if_getchar_to(int timeout)
void gdb_if_putchar(unsigned char c, int flush)
{
if(gdb_if_conn > 0)
(void)flush;
if (gdb_if_conn > 0)
send(gdb_if_conn, &c, 1, 0);
}

View File

@ -51,12 +51,11 @@
int jtagtap_init(void)
{
int err;
assert(ftdic != NULL);
/* Go to JTAG mode for SWJ-DP */
for(int i = 0; i <= 50; i++) jtagtap_next(1, 0); /* Reset SW-DP */
for (int i = 0; i <= 50; i++)
jtagtap_next(1, 0); /* Reset SW-DP */
jtagtap_tms_seq(0xE73C, 16); /* SWD to JTAG sequence */
jtagtap_soft_reset();

View File

@ -267,3 +267,11 @@ void platform_delay(uint32_t delay)
usleep(delay * 100000);
}
void morse(const char *msg, char repeat)
{
(void)repeat;
if (msg != NULL)
fprintf(stderr,"%s\n", msg);
}

View File

@ -40,12 +40,12 @@
#define PLATFORM_FATAL_ERROR(error) abort()
#define PLATFORM_SET_FATAL_ERROR_RECOVERY()
#define morse(x, y) fprintf(stderr,"%s\n", x)
#define morse_msg 0
extern struct ftdi_context *ftdic;
int platform_init(int argc, char **argv);
void morse(const char *msg, char repeat);
const char *platform_target_voltage(void);
void platform_delay(uint32_t delay);