1.usb init调整
This commit is contained in:
parent
05523fff20
commit
37325778eb
|
@ -89,6 +89,8 @@ SINT32 sf_hal_uart_deinit(void);
|
||||||
|
|
||||||
SINT32 sf_hal_ttyusb2_read_buf(SF_TTY_DATA_TYPE_S *recv);
|
SINT32 sf_hal_ttyusb2_read_buf(SF_TTY_DATA_TYPE_S *recv);
|
||||||
|
|
||||||
|
SINT32 sf_get_ttyusb_flag(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __cplusplus
|
#if __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ SINT32 app_ttyusb_IsOpen(void) {
|
||||||
static SINT32 s32ret = SF_SUCCESS;
|
static SINT32 s32ret = SF_SUCCESS;
|
||||||
static int flag = 0;
|
static int flag = 0;
|
||||||
|
|
||||||
if(flag)
|
if((flag) && (sf_get_ttyusb_flag()))
|
||||||
{
|
{
|
||||||
return s32ret;
|
return s32ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -457,6 +457,12 @@ SINT32 sf_hal_ttyusb2_read_buf(SF_TTY_DATA_TYPE_S *recv)
|
||||||
return SF_SUCCESS;
|
return SF_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SINT32 sf_get_ttyusb_flag(void)
|
||||||
|
{
|
||||||
|
return TtyUSB2Fd;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __cplusplus
|
#if __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user