Ticket #47816: patch-ft245r.diff
File patch-ft245r.diff, 1.0 KB (added by beck.dac@…, 9 years ago) |
---|
-
ft245r.c
old new 296 296 return 0; 297 297 } 298 298 299 static int set_sck(PROGRAMMER * pgm, int value) { 300 return set_pin(pgm, PIN_AVR_SCK, value); 301 } 302 299 303 static int set_reset(PROGRAMMER * pgm, int value) { 300 304 return set_pin(pgm, PIN_AVR_RESET, value); 301 305 } … … 420 424 421 425 ft245r_powerup(pgm); 422 426 427 /* Apply power between VCC and GND while RESET and SCK are set to â0â. In some systems, 428 * the programmer can not guarantee that SCK is held low during power-up. In this 429 * case, RESET must be given a 430 */ 431 set_sck(pgm, OFF); 432 423 433 set_reset(pgm, OFF); 424 434 usleep(5000); // 5ms 425 435 set_reset(pgm, ON); 426 436 usleep(5000); // 5ms 427 437 set_reset(pgm, OFF); 428 usleep(5000); // 5ms 438 439 /* Wait for at least 20 ms and enable serial programming by sending the Programming 440 * Enable serial instruction to pin MOSI. 441 */ 442 usleep(20000); // 20ms 429 443 430 444 return ft245r_program_enable(pgm, p); 431 445 }