Skip to content

Commit

Permalink
update stk500v1 sck display
Browse files Browse the repository at this point in the history
Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
  • Loading branch information
Ho-Ro committed Nov 22, 2023
1 parent e790d64 commit 44b404c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stk500.c
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ static int stk500_get_fosc(const PROGRAMMER *pgm, double *v) {
return rc;

if (prescale) {
fosc = STK500_XTAL / ((cmatch + 1) * 2 * ps[prescale - 1]);
fosc = PDATA(pgm)->xtal / ((cmatch + 1) * 2 * ps[prescale - 1]);
} else
fosc = 0;
*v = fosc;
Expand Down Expand Up @@ -1353,7 +1353,7 @@ static int stk500_get_sck_period(const PROGRAMMER *pgm, double *v) {
pmsg_error("cannot obtain sck duration\n");
return rv;
}
*v = dur * 8.0 / STK500_XTAL;
*v = dur * 8.0 / PDATA(pgm)->xtal;
return 0;
}

Expand Down

0 comments on commit 44b404c

Please sign in to comment.