An embodiment of the invention provides a method of data transmission and a mobile terminal. The method is applied to a mobile terminal, which includes at least one Type C interface. The method includes: when the charger is detected to connect to a mobile terminal, the charge of a TX+/TX of the C interface of the Type of the mobile terminal is completed. A handshake; when the storage device is detected to access the mobile terminal, the data transmission is carried out through the Type pin of the Type C interface with the storage device, and the data transmission is executed in accordance with the USB 2 protocol specification, which solves the problem that the mobile terminal in the existing technology can not transmit data to the storage device when it is charged, so that the mobile terminal in the existing technology can not transmit data to the storage device. The charge of the mobile terminal and the transmission of data to the storage device can be carried out at the same time, which improves the efficiency of the charging and data transmission of the mobile terminal, and enhances the convenience of the mobile terminal operation.
【技术实现步骤摘要】
一种数据传输的方法及移动终端
本专利技术实施例涉及通信
,尤其涉及一种数据传输的方法及移动终端。
技术介绍
USB(UniversalSerialBus,通用串行总线)是一个外部总线标准,用于规范电脑、手机等终端设备与外部设备的连接和通讯,是一种应用在通信领域的接口技术,包括有USBType-C等多种不同型号或规格的接口类型。USBType-C是目前行业中比较流行的一类USB接口,也是后续电脑、手机等终端设备的I/O(Input/Output,输入/输出)接口的发展方向,USBType-C可以支持正反两面插拔,并且传输数据的信号更强。采用USBType-C接口标准的移动终端,可以与采用相同接口标准的充电器连接,由充电器向移动终端充电;也可以与采用相同标准的存储设备连接,将移动终端内的数据传输至存储设备。但是,在充电时,移动终端是作为从设备,充电器为主设备;而在传输数据时移动终端则作为主设备,存储设备作为从设备。移动终端无法在接受充电器充电的时候,同时向存储设备传输数据。
技术实现思路
本专利技术实施例提供一种数据传输的方法及移动终端,以解决现有技术中移动终端在充电时无法向存储设备传输数据的问题。第一方面,本专利技术实施例提供了一种数据传输的方法,应用于移动终端,所述移动终端包括至少一个Type-C接口,所述方法包括:当检测到充电器接入移动终端时,通过所述移动终端的Type-C接口的TX+/TX-管脚完成充电握手;当检测到存储设备接入所述移动终端时,通过所述Type-C接口的D+/D-管脚与所述存储设备进行数据传输,所述数据传输按照USB2.0协议规范执行 ...
【技术保护点】
1.一种数据传输的方法,应用于移动终端,所述移动终端包括至少一个Type‑C接口,其特征在于,所述方法包括:当检测到充电器接入移动终端时,通过所述移动终端的Type‑C接口的TX+/TX‑管脚完成充电握手;当检测到存储设备接入所述移动终端时,通过所述Type‑C接口的D+/D‑管脚与所述存储设备进行数据传输,所述数据传输按照USB 2.0协议规范执行。
【技术特征摘要】
1.一种数据传输的方法,应用于移动终端,所述移动终端包括至少一个Type-C接口,其特征在于,所述方法包括:当检测到充电器接入移动终端时,通过所述移动终端的Type-C接口的TX+/TX-管脚完成充电握手;当检测到存储设备接入所述移动终端时,通过所述Type-C接口的D+/D-管脚与所述存储设备进行数据传输,所述数据传输按照USB2.0协议规范执行。2.根据权利要求1所述的方法,其特征在于,通过如下方式检测是否有充电器接入移动终端:当移动终端的Type-C接口的CC1管脚检测到上拉电平时,识别有充电器接入所述移动终端。3.根据权利要求1或2所述的方法,其特征在于,通过如下方式检测是否有存储设备接入移动终端:当移动终端的Type-C接口的CC2管脚检测到下拉到地的电平时,识别有存储设备接入所述移动终端。4.根据权利要求3所述的方法,其特征在于,在所述通过所述Type-C接口的D+/D-管脚与所述存储设备进行数据传输的步骤前,还包括:所述充电器向所述存储设备供电。5.根据权利要求4所述的方法,其特征在于,所述充电器包括至少一个Type-C接口,所述充电器向所述存储设备供电的步骤包括:所述充电器通过Type-C接口的vbus管脚向所述存储...
【专利技术属性】
技术研发人员:刘彦彬,陈志刚,杨鹏博,
申请(专利权)人:维沃移动通信有限公司,
类型:发明
国别省市:广东,44
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。