Changeset 4637


Ignore:
Timestamp:
09/09/08 00:40:16 (5 years ago)
Author:
werner
Message:
  • dbgrst.c (set_high): repeat the command several times since it sometimes gets lost
  • Makefile: make "install" depend on "dbgrst"
Location:
developers/werner/dbgrst
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • developers/werner/dbgrst/Makefile

    r4630 r4637  
    88all:            dbgrst 
    99 
    10 install: 
     10install:        dbgrst 
    1111                install -D dbgrst $(PREFIX)/bin/dbgrst 
    1212 
  • developers/werner/dbgrst/dbgrst.c

    r4630 r4637  
    8080                direction, 
    8181        }; 
     82        int i; 
    8283 
    83         if (ftdi_write_data(&ftdi, buf, 3) < 0) { 
    84                 fprintf(stderr, "ftdi_write_data: %s\n", 
    85                     ftdi_get_error_string(&ftdi)); 
    86                 exit(1); 
    87         } 
     84        /* 
     85         * For some reason, the FTDI sometimes doesn't accept the setting. 
     86         * So we repeat a number of times to make it clear that compliance 
     87         * is not optional. 
     88         */ 
     89        for (i = 0; i != 10; i++) 
     90                if (ftdi_write_data(&ftdi, buf, 3) < 0) { 
     91                        fprintf(stderr, "ftdi_write_data: %s\n", 
     92                            ftdi_get_error_string(&ftdi)); 
     93                        exit(1); 
     94                } 
    8895} 
    8996 
Note: See TracChangeset for help on using the changeset viewer.