Skip to content

Commit 9d025e6

Browse files
committed
Fix linuxspi baud to clock period calculation
avrdudes#927 related
1 parent 1363c7f commit 9d025e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/linuxspi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ static int linuxspi_open(PROGRAMMER *pgm, char *port)
223223
avrdude_message(MSG_INFO,
224224
"%s: obsolete use of -b <clock> option for bit clock; use -B <clock>\n",
225225
progname);
226-
pgm->bitclock = 1E6 / pgm->baudrate;
226+
pgm->bitclock = 1.0 / pgm->baudrate;
227227
}
228228
if (pgm->bitclock == 0) {
229229
avrdude_message(MSG_NOTICE,

0 commit comments

Comments
 (0)