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
This commit is contained in:
joerg_wunsch 2006-07-19 21:19:42 +00:00
parent 9b2be8e3fb
commit 2864bd0eb5
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2006-07-19 Joerg Wunsch <j@uriah.heep.sax.de>
* 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 <j@uriah.heep.sax.de>
* stk500v2.c: Fix all bugs in stk500pp. Eliminate pagebuf, and

View File

@ -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