mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-13 09:24:55 +00:00
Exchange of fprintf(stderr, ...) with avrdude_message(...).
This change was made for the shared library, since library functions should not write to std-streams directly. Instead avrdude_message() has to be implemented by the library user. For the avrdude application this function is implemented in main.c. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1305 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
@@ -219,7 +219,7 @@ static int linuxgpio_highpulsepin(PROGRAMMER * pgm, int pinfunc)
|
||||
|
||||
static void linuxgpio_display(PROGRAMMER *pgm, const char *p)
|
||||
{
|
||||
fprintf(stderr, "%sPin assignment : /sys/class/gpio/gpio{n}\n",p);
|
||||
avrdude_message("%sPin assignment : /sys/class/gpio/gpio{n}\n",p);
|
||||
pgm_display_generic_mask(pgm, p, SHOW_AVR_PINS);
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ static int linuxgpio_open(PROGRAMMER *pgm, char *port)
|
||||
i == PIN_AVR_MISO ) {
|
||||
pin = pgm->pinno[i] & PIN_MASK;
|
||||
if ((r=linuxgpio_export(pin)) < 0) {
|
||||
fprintf(stderr, "Can't export GPIO %d, already exported/busy?: %s",
|
||||
avrdude_message("Can't export GPIO %d, already exported/busy?: %s",
|
||||
pin, strerror(errno));
|
||||
return r;
|
||||
}
|
||||
@@ -346,9 +346,8 @@ const char linuxgpio_desc[] = "GPIO bitbanging using the Linux sysfs interface";
|
||||
|
||||
void linuxgpio_initpgm(PROGRAMMER * pgm)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"%s: Linux sysfs GPIO support not available in this configuration\n",
|
||||
progname);
|
||||
avrdude_message("%s: Linux sysfs GPIO support not available in this configuration\n",
|
||||
progname);
|
||||
}
|
||||
|
||||
const char linuxgpio_desc[] = "GPIO bitbanging using the Linux sysfs interface (not available)";
|
||||
|
||||
Reference in New Issue
Block a user