[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avrdude-dev] [bug #40748] linuxgpio doesn't work on Raspberry PI re
From: |
Radoslav Kolev |
Subject: |
Re: [avrdude-dev] [bug #40748] linuxgpio doesn't work on Raspberry PI rev. 2. |
Date: |
Sat, 30 Nov 2013 12:57:55 +0200 |
On Sat, Nov 30, 2013 at 10:15 AM, Joakim Lubeck <address@hidden> wrote:
> On Fri, November 29, 2013 11:42 pm, René Liebscher wrote:
> Now I don't know the details here, but should there be only || in that if
> statement? I tested with
No, this check is a kludge, to allow 0 based pin numbers, before René
submitted the proper changes for that. The best solution would be to
convert linuxgpio programmer to use this new infrastructure. I haven't
had time to do this unfortunately.
> if ( pgm->pinno[i] != 0
Before if a pin was not configured, is was assured that is will be set
to 0, and this check relies on this. After the changes for 0 based
pins this is no longer so. As a quick fix you can try this patch to
the pin_fill_old_pinno() funtcion below, which replicates this
behavior for not configured pins. This is not even compile tested, so
try at your own risk :). René can probably say if it's a good idea to
do this and if it can have some bad side effects.
diff --git a/avrdude/pindefs.c b/avrdude/pindefs.c
index 8842649..00ae753 100644
--- a/avrdude/pindefs.c
+++ b/avrdude/pindefs.c
@@ -73,6 +73,11 @@ static void pin_fill_old_pinno(const struct
pindef_t * const pindef, unsigned in
}
}
}
+
+ if (!found) {
+ *pinno = 0;
+ }
+
}
/**
Regards,
Rado