1.usb init调整

This commit is contained in:
payton 2024-02-05 15:57:31 +08:00
parent 05523fff20
commit 37325778eb
3 changed files with 9 additions and 1 deletions

View File

@ -89,6 +89,8 @@ SINT32 sf_hal_uart_deinit(void);
SINT32 sf_hal_ttyusb2_read_buf(SF_TTY_DATA_TYPE_S *recv);
SINT32 sf_get_ttyusb_flag(void);
#ifdef __cplusplus
#if __cplusplus
}

View File

@ -99,7 +99,7 @@ SINT32 app_ttyusb_IsOpen(void) {
static SINT32 s32ret = SF_SUCCESS;
static int flag = 0;
if(flag)
if((flag) && (sf_get_ttyusb_flag()))
{
return s32ret;
}

View File

@ -457,6 +457,12 @@ SINT32 sf_hal_ttyusb2_read_buf(SF_TTY_DATA_TYPE_S *recv)
return SF_SUCCESS;
}
SINT32 sf_get_ttyusb_flag(void)
{
return TtyUSB2Fd;
}
#ifdef __cplusplus
#if __cplusplus
}