FreeCalypso > hg > freecalypso-tools
diff loadtools/chainload.c @ 651:6bb41b4d39ed
fc-xram number of records per batch made baudrate-dependent
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 02 Mar 2020 03:39:46 +0000 |
parents | bf840c984113 |
children | 9f5a3e9e6294 |
line wrap: on
line diff
--- a/loadtools/chainload.c Mon Mar 02 03:21:41 2020 +0000 +++ b/loadtools/chainload.c Mon Mar 02 03:39:46 2020 +0000 @@ -9,6 +9,7 @@ #include <string.h> #include <strings.h> #include <time.h> +#include "../libserial/baudrate.h" #include "srecreader.h" extern int target_fd; @@ -71,7 +72,8 @@ exit(1); } if (!rec_count) { - printf("Each \'.\' is 100 S-records\n"); + printf("Each \'.\' is %d S-records\n", + current_baud_rate->xram_records); time(&start_time); } reclen = xramimage.datalen + 6; @@ -80,7 +82,7 @@ exit(1); } rec_count++; - if (rec_count % 100 == 0) { + if (rec_count % current_baud_rate->xram_records == 0) { scratch[0] = 0x05; /* ENQ */ write(target_fd, scratch, 1); if (collect_binblock_from_target(scratch, 3, 1))