Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change smartcard speed configuration in BBIO mode to custom value #88

Merged
merged 2 commits into from
Dec 8, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Smartcard BBIO mode reset to default speed in case of error
  • Loading branch information
sylvainpelissier committed Dec 8, 2018
commit 6601cd2404ac91a4510eaf853c99bedd4a01631e
2 changes: 2 additions & 0 deletions src/hydrabus/hydrabus_bbio_smartcard.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ void bbio_mode_smartcard(t_hydra_console *con)

if(status != BSP_OK) {
cprint(con, "\x00", 1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should reset to default speed in case of error.
Add the following lines here

proto->config.smartcard.dev_speed = SMARTCARD_DEFAULT_SPEED;
bsp_smartcard_init(proto->dev_num, proto);

proto->config.smartcard.dev_speed = SMARTCARD_DEFAULT_SPEED;
bsp_smartcard_init(proto->dev_num, proto);
break;
}
final_baudrate = bsp_smartcard_get_final_baudrate(proto->dev_num);
Expand Down