Skip to content

Commit 5bf24e4

Browse files
committed
patch #9327: ft245r.c: add TPI support (patches 1-4)
Submitted by David Mosberger-Tang: ft245r.c (set_pin, ft245r_open): use ft245r_send_and_discard() so ft245r_in can go away git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1486 81a1dc3b-b13d-400b-aceb-764788c761c2
1 parent 105cebb commit 5bf24e4

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2021-11-24 Joerg Wunsch <[email protected]>
2+
3+
Submitted by David Mosberger-Tang:
4+
patch #9327: ft245r.c: add TPI support (patches 1-4)
5+
* ft245r.c (set_pin, ft245r_open): use
6+
ft245r_send_and_discard() so ft245r_in can go away
7+
18
2021-11-24 Joerg Wunsch <[email protected]>
29

310
Submitted by David Mosberger-Tang:

ft245r.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ static struct ftdi_context *handle;
151151

152152
static unsigned char ft245r_ddr;
153153
static unsigned char ft245r_out;
154-
static unsigned char ft245r_in;
155154

156155
#define BUFSIZE 0x2000
157156

@@ -321,10 +320,7 @@ static int set_pin(PROGRAMMER * pgm, int pinname, int val) {
321320
ft245r_out = SET_BITS_0(ft245r_out,pgm,pinname,val);
322321
buf[0] = ft245r_out;
323322

324-
ft245r_send (pgm, buf, 1);
325-
ft245r_recv (pgm, buf, 1);
326-
327-
ft245r_in = buf[0];
323+
ft245r_send_and_discard(pgm, buf, 1);
328324
return 0;
329325
}
330326

@@ -880,8 +876,7 @@ static int ft245r_open(PROGRAMMER * pgm, char * port) {
880876
*/
881877
ft245r_drain (pgm, 0);
882878

883-
ft245r_send (pgm, &ft245r_out, 1);
884-
ft245r_recv (pgm, &ft245r_in, 1);
879+
ft245r_send_and_discard(pgm, &ft245r_out, 1);
885880

886881
return 0;
887882

0 commit comments

Comments
 (0)