[FL-1441] ApiHalVcp: use DTR signal for ready flag. Fix memory leak in subghz. (#519)
* ApiHalVcp: use DTR signal for ready flag. Fix memory leak in subghz. * Backport VCP fix to F5
This commit is contained in:
@@ -43,9 +43,9 @@ void _api_hal_vcp_deinit() {
|
||||
void _api_hal_vcp_control_line(uint8_t state) {
|
||||
// bit 0: DTR state, bit 1: RTS state
|
||||
// bool dtr = state & 0b01;
|
||||
bool rts = state & 0b10;
|
||||
bool dtr = state & 0b1;
|
||||
|
||||
if (rts) {
|
||||
if (dtr) {
|
||||
if (!api_hal_vcp->alive) {
|
||||
api_hal_vcp->alive = true;
|
||||
_api_hal_vcp_rx_callback(&ascii_soh, 1); // SOH
|
||||
|
@@ -43,9 +43,9 @@ void _api_hal_vcp_deinit() {
|
||||
void _api_hal_vcp_control_line(uint8_t state) {
|
||||
// bit 0: DTR state, bit 1: RTS state
|
||||
// bool dtr = state & 0b01;
|
||||
bool rts = state & 0b10;
|
||||
bool dtr = state & 0b1;
|
||||
|
||||
if (rts) {
|
||||
if (dtr) {
|
||||
if (!api_hal_vcp->alive) {
|
||||
api_hal_vcp->alive = true;
|
||||
_api_hal_vcp_rx_callback(&ascii_soh, 1); // SOH
|
||||
|
Reference in New Issue
Block a user