Remove Flip 2 stub functions
Used when compiling without libusb. Print reasonable error instead
This commit is contained in:
parent
80ca8a644e
commit
e1a317c670
80
src/flip2.c
80
src/flip2.c
|
@ -168,10 +168,6 @@ static const char * flip2_status_str(const struct dfu_status *status);
|
||||||
static const char * flip2_mem_unit_str(enum flip2_mem_unit mem_unit);
|
static const char * flip2_mem_unit_str(enum flip2_mem_unit mem_unit);
|
||||||
static enum flip2_mem_unit flip2_mem_unit(const char *name);
|
static enum flip2_mem_unit flip2_mem_unit(const char *name);
|
||||||
|
|
||||||
#endif /* HAVE_LIBUSB */
|
|
||||||
|
|
||||||
/* THE INITPGM FUNCTION DEFINITIONS */
|
|
||||||
|
|
||||||
void flip2_initpgm(PROGRAMMER *pgm) {
|
void flip2_initpgm(PROGRAMMER *pgm) {
|
||||||
strcpy(pgm->type, "flip2");
|
strcpy(pgm->type, "flip2");
|
||||||
|
|
||||||
|
@ -194,7 +190,6 @@ void flip2_initpgm(PROGRAMMER *pgm) {
|
||||||
pgm->teardown = flip2_teardown;
|
pgm->teardown = flip2_teardown;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBUSB
|
|
||||||
/* EXPORTED PROGRAMMER FUNCTION DEFINITIONS */
|
/* EXPORTED PROGRAMMER FUNCTION DEFINITIONS */
|
||||||
|
|
||||||
int flip2_open(PROGRAMMER *pgm, const char *port_spec) {
|
int flip2_open(PROGRAMMER *pgm, const char *port_spec) {
|
||||||
|
@ -941,76 +936,17 @@ enum flip2_mem_unit flip2_mem_unit(const char *name) {
|
||||||
return FLIP2_MEM_UNIT_UNKNOWN;
|
return FLIP2_MEM_UNIT_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* HAVE_LIBUSB */
|
#else /* !HAVE_LIBUSB */
|
||||||
|
|
||||||
/* EXPORTED PROGRAMMER FUNCTION DEFINITIONS */
|
// Give a proper error if we were not compiled with libusb
|
||||||
|
static int flip2_nousb_open(PROGRAMMER* pgm, const char* name) {
|
||||||
int flip2_open(PROGRAMMER *pgm, const char *port_spec) {
|
avrdude_message(MSG_INFO, "%s: error: No usb support. Please compile again with libusb installed.\n", progname);
|
||||||
fprintf(stderr, "%s: Error: No USB support in this compile of avrdude\n",
|
return -1;
|
||||||
progname);
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int flip2_initialize(const PROGRAMMER *pgm, const AVRPART *part) {
|
void flip2_initpgm(PROGRAMMER *pgm) {
|
||||||
return -1;
|
strcpy(pgm->type, "flip2");
|
||||||
|
pgm->open = flip2_nousb_open;
|
||||||
}
|
}
|
||||||
|
|
||||||
void flip2_close(PROGRAMMER* pgm)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void flip2_enable(PROGRAMMER *pgm, const AVRPART *p) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void flip2_disable(const PROGRAMMER *pgm) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void flip2_display(const PROGRAMMER *pgm, const char *prefix) {
|
|
||||||
}
|
|
||||||
|
|
||||||
int flip2_program_enable(const PROGRAMMER *pgm, const AVRPART *part) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int flip2_chip_erase(const PROGRAMMER *pgm, const AVRPART *part) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int flip2_read_byte(const PROGRAMMER *pgm, const AVRPART *part, const AVRMEM *mem,
|
|
||||||
unsigned long addr, unsigned char *value)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int flip2_write_byte(const PROGRAMMER *pgm, const AVRPART *part, const AVRMEM *mem,
|
|
||||||
unsigned long addr, unsigned char value)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int flip2_paged_load(const PROGRAMMER *pgm, const AVRPART *part, const AVRMEM *mem,
|
|
||||||
unsigned int page_size, unsigned int addr, unsigned int n_bytes)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int flip2_paged_write(const PROGRAMMER *pgm, const AVRPART *part, const AVRMEM *mem,
|
|
||||||
unsigned int page_size, unsigned int addr, unsigned int n_bytes)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int flip2_read_sig_bytes(const PROGRAMMER *pgm, const AVRPART *part, const AVRMEM *mem) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void flip2_setup(PROGRAMMER * pgm)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void flip2_teardown(PROGRAMMER * pgm)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* HAVE_LIBUSB */
|
#endif /* HAVE_LIBUSB */
|
||||||
|
|
Loading…
Reference in New Issue