Skip to content

Commit

Permalink
put that back
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Jun 11, 2018
1 parent fa66e4b commit 7edc88e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions board/drivers/canbitbang.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ void bitbang_gmlan(CAN_FIFOMailBox_TypeDef *to_bang) {
silent_count = 0;
}
int lwait = TIM2->CNT;
while ((TIM2->CNT - lwait) < SPEEED);
while (get_ts_elapsed(TIM2->CNT, lwait) < SPEEED);
}

// send my message with optional failure
int last = 1;
int init = TIM2->CNT;
for (int i = 0; i < len; i++) {
while ((TIM2->CNT - init) < (SPEEED*i));
while (get_ts_elapsed(TIM2->CNT, init) < (SPEEED*i));
int read = get_gpio_input(GPIOB, 12);
if ((read == 0 && last == 1) && i != (len-11)) {
puts("ERR: bus driven at ");
Expand Down

0 comments on commit 7edc88e

Please sign in to comment.