Skip to content

Commit

Permalink
Remove some prints
Browse files Browse the repository at this point in the history
  • Loading branch information
seanavery committed Apr 28, 2024
1 parent 2ebd918 commit 54f3d2d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions ch340.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,27 @@ int CH340::init(int vendor, int product, int baudrate) {

err = init_usb(vendor, product);
if (err != 0) {
printf("error: %d \n", err);
std::cerr << "Error initializing usb: " << libusb_error_name(err) << std::endl;
return err;
}
printf("usb interface initialized \n");

err = handshake();
if (err != 0) {
printf("error: %d \n", err);
std::cerr << "Error during handshake: " << libusb_error_name(err) << std::endl;
return err;
}
printf("ch340g initialized \n");

err = set_baud(baudrate);
if (err != 0) {
printf("error: %d \n", err);
std::cerr << "Error setting baudrate: " << libusb_error_name(err) << std::endl;
return err;
}

err = up();
if (err != 0) {
printf("error: %d \n", err);
std::cerr << "Error during up: " << libusb_error_name(err) << std::endl;
return err;
}
printf("ch340g up \n");

return err;
}
Expand Down

0 comments on commit 54f3d2d

Please sign in to comment.