From 2864bd0eb5e0378305584d6600217b9472af1d38 Mon Sep 17 00:00:00 2001 From: joerg_wunsch Date: Wed, 19 Jul 2006 21:19:42 +0000 Subject: [PATCH] Hide stk500v2_set_sck_period_mk2() behind an #if defined(HAVE_LIBUSB) as it is only used there (for the AVRISP mkII). git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@590 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 6 ++++++ stk500v2.c | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f41da2c2..36ea7f2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-07-19 Joerg Wunsch + + * stk500v2.c: Hide stk500v2_set_sck_period_mk2() behind an #if + defined(HAVE_LIBUSB) as it is only used there (for the AVRISP + mkII). + 2006-07-17 Joerg Wunsch * stk500v2.c: Fix all bugs in stk500pp. Eliminate pagebuf, and diff --git a/stk500v2.c b/stk500v2.c index e5e7efc3..b53ffef9 100644 --- a/stk500v2.c +++ b/stk500v2.c @@ -95,9 +95,12 @@ static void stk500v2_print_parms1(PROGRAMMER * pgm, char * p); static int stk500v2_is_page_empty(unsigned int address, int page_size, const unsigned char *buf); -static int stk500v2_set_sck_period_mk2(PROGRAMMER * pgm, double v); static unsigned int stk500v2_mode_for_pagesize(unsigned int pagesize); +#if defined(HAVE_LIBUSB) +static int stk500v2_set_sck_period_mk2(PROGRAMMER * pgm, double v); +#endif + static int stk500v2_send_mk2(PROGRAMMER * pgm, unsigned char * data, size_t len) { if (serial_send(pgm->fd, data, len) != 0) { @@ -1468,6 +1471,7 @@ double avrispmkIIfreqs[] = { 65.0, 61.9, 59.0, 56.3, 53.6, 51.1 }; +#if defined(HAVE_LIBUSB) static int stk500v2_set_sck_period_mk2(PROGRAMMER * pgm, double v) { int i; @@ -1482,6 +1486,7 @@ static int stk500v2_set_sck_period_mk2(PROGRAMMER * pgm, double v) return stk500v2_setparm(pgm, PARAM_SCK_DURATION, i); } +#endif /* HAVE_LIBUSB */ /* * Return the "mode" value for the parallel and HVSP modes that