reworked usb serial communication (#1766)

This commit is contained in:
Bernd Herzog 2024-01-13 18:05:29 +01:00 committed by GitHub
parent 58307aee9c
commit 7a4c3184a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 188 additions and 53 deletions

View file

@ -20,7 +20,7 @@
*/
#include "usb_serial_shell_filesystem.hpp"
#include "usb_serial_io.h"
#include "usb_serial_device_to_host.h"
#include "chprintf.h"
#include "string_format.hpp"
@ -172,6 +172,9 @@ void cmd_sd_close(BaseSequentialStream* chp, int argc, char* argv[]) {
return;
}
auto error = shell_file->sync();
if (report_on_error(chp, error)) return;
delete shell_file;
shell_file = nullptr;