WO2017118441A1 - 一种接口管脚配置的方法及装置 - Google Patents

一种接口管脚配置的方法及装置 Download PDF

Info

Publication number
WO2017118441A1
WO2017118441A1 PCT/CN2017/071011 CN2017071011W WO2017118441A1 WO 2017118441 A1 WO2017118441 A1 WO 2017118441A1 CN 2017071011 W CN2017071011 W CN 2017071011W WO 2017118441 A1 WO2017118441 A1 WO 2017118441A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
module
sub
external device
stored information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2017/071011
Other languages
English (en)
French (fr)
Inventor
杨玉巍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cloudminds Shenzhen Robotics Systems Co Ltd
Original Assignee
Cloudminds Shenzhen Robotics Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cloudminds Shenzhen Robotics Systems Co Ltd filed Critical Cloudminds Shenzhen Robotics Systems Co Ltd
Publication of WO2017118441A1 publication Critical patent/WO2017118441A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Definitions

  • the present invention relates to the technical field of interface connection detection processing, and can be applied to the field of cloud intelligent robots, and in particular, to a method and device for configuring interface pins.
  • the current solution is to power on each pin of the interface directly after the interface connected between the device or module is plugged in.
  • the embodiment of the present application provides a method and a device for configuring an interface pin, which may be used as a security risk in the existing interface connection processing solution.
  • the embodiment of the present application provides a method for configuring an interface pin, including the following steps:
  • the first device reads the pre-stored information of the external device or the module through the preset pin of the interface; the external device or module is connected to the first device by using the interface; the pre-stored information includes: the external device or module Type, power supply mode or communication interface type;
  • the pins of the interface are configured according to the pre-stored information.
  • An embodiment of the present application provides an apparatus for configuring an interface pin, including:
  • a reading unit configured to read, by using a preset pin of the interface, pre-stored information of the external device or the module; the external device or module is connected to the first device by using the interface; the pre-stored information includes: the external device Type of device or module, power supply mode, or communication interface type;
  • a configuration unit configured to configure a pin of the interface according to the pre-stored information.
  • the embodiment of the present invention provides a method and a device for configuring an interface pin, because the pre-stored information of the external device or the module is read by the preset pin of the interface, and the first device and the device are compared according to the pre-stored information.
  • the external device or the interface connected to the module is configured, and the first device can perform interface configuration according to the pre-stored information of the external device or the module, so as to avoid directly supplying power to each pin after the interface is plugged in the prior art, which may result in Safety hazards such as equipment damage and improve the safety of equipment connections.
  • FIG. 1 is a schematic flowchart of a method for configuring an interface pin in an embodiment of the present application
  • FIG. 2 is a schematic diagram of a first device connected to an external device or a module through an interface, where 1 is a first device, 2 is an interface, and 3 is an external device or module;
  • FIG. 3 is a schematic structural diagram of an interface of an interface in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of distribution of interface pins in an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an apparatus for configuring an interface pin in an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an implementation process of an interface pin configuration in an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a method for configuring an interface pin in an embodiment of the present application. As shown in FIG. 1 , the method for configuring the interface pin may include the following steps:
  • Step 101 The first device reads the pre-stored information of the external device or the module through the preset pin of the interface; the external device or module is connected to the first device by using the interface; the pre-stored information includes: the external device Type of device or module, power supply mode, or communication interface type;
  • Step 102 Configure a pin of the interface according to the pre-stored information.
  • the first device may be a smart handheld device, a cloud intelligent robot, or the like.
  • the preset pin can be any pin that has the data communication function to read the pre-stored information from the external device.
  • it can be the data pin of the UART (Universal Asynchronous Receiver/Transmitter) sub-interface, USB (Universal)
  • USB Universal
  • the data pin of the sub-interface of the Serial Bus (Universal Serial Bus), the data pin of the I2C (Inter-Integrated Circuit) sub-interface, or other function pins are not specifically limited here.
  • FIG. 2 is a schematic diagram of a first device connected to an external device or module through an interface according to an embodiment of the present application.
  • an interface 2 that can be connected to an external device or module 3 is provided on the first device, and is externally connected.
  • the device or module 3 is provided with an interface matching the interface 2, and the first device is connected to the external device or module through an interface.
  • the method for configuring the interface pin provided by the embodiment of the present application is to read the pre-stored information of the external device or the module by using the preset pin of the interface, and according to the pre-stored information, the first device and the external device or The interface connected to the module is configured, and the first device can perform interface configuration according to the pre-stored information of the external device or the module, so as to avoid power supply to each pin directly after the interface is plugged in the prior art, and the device may be damaged. Hidden dangers to improve the security of device connections.
  • the method may further include:
  • All pin connections of the interface are determined according to the detection result of the insertion detection sub-interface.
  • the interface may include an insertion detection sub-interface. After the first device is connected to the external device or the module, the insertion detection sub-interface can determine whether all the pins of the interface are connection.
  • the pin of the insertion detection sub-interface of the interface may be connected to the GND (Ground) of the interface provided on the external device or the module, and the first device detects the level of the pin inserted into the detection sub-interface. If it is low, all the pins of the interface are connected to the interface of the external device or module; otherwise, one or more pins of the interface are not connected to the interface of the external device or module. .
  • GND Ground
  • the first device Before the first device reads the pre-stored information of the external device or module through the interface, inserting the detection sub-interface to perform the insertion connection detection of the interface pin, and ensuring that the interface is correctly connected, and then opening the preset pin of the interface to read the external connection.
  • Pre-stored information of the device or module to avoid the problem of reading pre-stored information when the interface is poorly connected.
  • the first device reads the pre-stored information of the external device or the module through the preset pin of the interface, which may specifically include:
  • the first device supplies power to the I2C sub-interface of the interface
  • I2C is a bidirectional two-wire continuous bus, providing serial communication lines between integrated circuits, using one data line (SDA), plus one clock line (SCL) to complete data transmission and peripheral device expansion. Since the addressing of I2C is a soft addressing mode, the chip select line can be saved.
  • the amount of data stored in pre-stored information is usually not very large.
  • the I2C bus has three data transmission speeds: standard (100Kbps), fast mode (400Kbps) and high-speed mode (3.4Mbps), which can fully meet the speed requirement for pre-stored information reading.
  • the memory storing the pre-stored information is powered by the power supply pin of the I2C sub-interface, instead of being powered by an external device or module, the external device or the module can be used normally without powering up, thereby improving the security of use.
  • the method may further include:
  • Determining that the first device allows connection to the external device or module according to the type of the external device or module.
  • the pin of the interface before configuring the pin of the interface according to the pre-stored information, it may also be determined whether the type of the external device or module in the pre-stored information is allowed to be connected by the first device. If it is determined that the first device allows connection of the external device or module, continuing to configure the pin of the interface according to the pre-stored information. By determining that the type of the external device or module is the type of device or module that the first device is allowed to connect to, it is possible to avoid erroneous device connections and avoid unnecessary configuration of the pins of the interface.
  • the method for configuring the interface pin may further include:
  • the interface connection is exited.
  • the interface is disconnected, the interface is not configured and powered, and the fault information is reported.
  • the external device or module is prompted to be a device or module that the first device prohibits connection or does not recognize.
  • configuring the pin of the interface according to the pre-stored information may specifically include:
  • one or more of the communication sub-interfaces of the interface are as follows according to the communication interface type in the pre-stored information: a PCIE (Peripheral Component Interconnect Express) sub-interface, a UART sub-interface, and a SIM (Subscriber) Identity Module, Customer Identification Module) Card subinterface, I2C subinterface or USB subinterface.
  • PCIE Peripheral Component Interconnect Express
  • UART sub-interface a UART sub-interface
  • SIM Subscriber
  • I2C subinterface I2C subinterface
  • USB subinterface USB subinterface
  • the pin of the interface required for the external device or module to communicate with the first device is connected according to the pre-stored information, and the pin may include: an I2C sub-interface, a UART sub-interface, and a SIM. Power pins, data pins, etc. in sub-interfaces such as the card sub-interface, the status detection sub-interface, and the control sub-interface. And configuring power supply parameters of the power pins of each sub-interface according to the pre-stored information, wherein the power supply parameters may include: an input voltage range, an output voltage, an output power, an efficiency, and the like.
  • the power supply mode in the pre-stored information it is determined whether the external device or the module is powered by the first device or the first device, and correspondingly, the external electronic interface or the charging sub-interface is turned on, thereby improving the security of the power supply of the device.
  • the pre-stored information may further include: attribute information of the external device or module, where the attribute information includes: a master device, or a slave device;
  • the method may further include:
  • the pre-stored information may further include attribute information of the external device or module. That is, the external device or module is a master device or a slave device.
  • the master-slave relationship between the first device and the external device or the module is determined as follows: the first device is a slave device, and the external device or module is a master device; Determining a master-slave relationship between the first device and the external device or module is: the first device is a master device, and the external device or module is a slave device.
  • the interface may further include: a status detection sub-interface, a control sub-interface, an external electronic interface, or a charging sub-interface.
  • the external electronic interface in the interface is a sub-interface that provides power to the external device or module;
  • the charging sub-interface is The external device or module providing the power supply provides a sub-interface for providing power to the first device;
  • the insertion detection sub-interface is a sub-interface for determining whether the external device or module is correctly plugged into the interface;
  • the PCIE sub-interface, the USB sub-interface, and the UART sub-interface And I2C sub-interfaces are high, medium and low respectively
  • the SIM card sub-interface is a sub-interface for communicating with the SIM card in the external device or module having the wireless communication function;
  • the state detection sub-interface and the control sub-interface are interfaces for detecting and controlling the functional status of the external device or the module,
  • the number and distribution of interface pins can be freely defined according to functional requirements.
  • FIG. 4 is a schematic diagram of interface pin distribution in the embodiment of the present application.
  • the PCIE sub-interface, the USB sub-interface, the I2C sub-interface, and the UART sub-interface are commonly used communication interfaces in device connection, these are Subinterfaces are defined independently of each other on the associated pins of the interface.
  • Pins 1 to 6 belong to the external electronic interface
  • pins 7 and 62 belong to the insertion detection sub-interface
  • pins 11, 13, 17, 19, 23, 25, 29, 31, 33 belong to the PCIE sub-interface
  • pin 37 and 39 belongs to the UART sub-interface
  • pins 47, 49, 51, 53, 55 belong to the SIM card sub-interface
  • pins 59, 61, 63 belong to the I2C sub-interface
  • pins 65-68 belong to the charging sub-interface
  • pins 44, 46, 50, 52, 56, 58 belong to the USB sub-interface
  • pins 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 38, 40 belong to the status detection sub-interface
  • the control sub-interface multiplexes the pins.
  • a GND pin can be placed between the data pins, for example, pins 9, 15, 21, 27, 35, 36, 42, 45, 48, 54, 57, and 60 are all GND pins that reduce interference between data pins.
  • the state detection sub-interface and the control sub-interface may multiplex the same data pin.
  • the state detection sub-interface and the control sub-interface can be multiplexed with the same data pin to properly utilize the pins of the interface.
  • an apparatus for configuring an interface pin is also provided in the embodiment of the present application. Since the principle of solving the problem is similar to the method of configuring an interface pin, the implementation of the device can refer to the implementation of the method. , the repetition will not be repeated.
  • FIG. 5 is a schematic structural diagram of an apparatus for configuring an interface pin in an embodiment of the present application, as shown in FIG. 5,
  • the device configured by the interface pin may include:
  • the reading unit 501 is configured to read the pre-stored information of the external device or the module through the preset pin of the interface; the external device or module is connected to the first device by using the interface; the pre-stored information includes: Type of external device or module, power supply mode, or communication interface type;
  • the configuration unit 502 is configured to configure a pin of the interface according to the pre-stored information.
  • the device configured by the interface pin may further include:
  • a detecting unit configured to detect an insertion detection sub-interface of the interface before the first device reads the pre-stored information of the external device or the module through the interface;
  • connection determining unit configured to determine, according to the detection result of the insertion detection sub-interface, all the pin connections of the interface.
  • the reading unit may be specifically configured to supply power to an integrated circuit bus I2C sub-interface of the interface; and read the pre-stored information from the external device or module by using a data pin of the I2C sub-interface;
  • the pre-stored information is pre-stored in the memory of the external device or module, and the memory is powered by the power pin of the I2C sub-interface.
  • the device configured by the interface pin may further include:
  • connection determining unit is configured to determine, according to the type of the external device or the module, the connection of the external device or the module according to the type of the external device or module before configuring the pin of the interface according to the pre-stored information.
  • the device configured by the interface pin may further include:
  • connection unit is configured to exit the interface connection if it is determined that the first device does not allow connection to the external device or module.
  • the configuration unit may be configured to: according to the power supply mode in the pre-stored information, configure a power supply parameter of a power pin of each sub-interface of the interface; and according to the type of the communication interface in the pre-stored information, One or more of the communication sub-interfaces of the interface: a PCIE sub-interface, a UART sub-interface, a SIM card sub-interface, an I2C sub-interface, or a USB sub-interface.
  • the pre-stored information may further include: attribute information of the external device or module, where the attribute information includes: a master device, or a slave device;
  • the device may further include:
  • a master-slave relationship determining unit configured to determine a master-slave relationship between the first device and the external device or module according to the attribute information.
  • the interface may further include: a status detection sub-interface, a control sub-interface, an external electronic interface, or a charging sub-interface.
  • the state detection sub-interface and the control sub-interface may multiplex the same data pin.
  • FIG. 6 is a schematic diagram of an implementation process of an interface pin configuration in the embodiment of the present application. As shown in FIG. 6 , a specific application scenario is described below. After connecting the interface, first insert the detection sub-interface for insertion detection to determine whether all the pins of the interface are connected. If not, exit the interface connection; if yes, connect the I2C sub-interface of the interface. After reading the pre-stored information of the external device or module through the data pin of the I2C sub-interface, determine whether the type of the external device or module is the type that the first device allows to connect.
  • one or more communication sub-interfaces in the interface are connected according to the communication interface type in the pre-stored information, where the communication sub-interface may include: a PCIE sub-interface, a UART sub-interface, a SIM card sub-interface, and an I2C Subinterface or USB subinterface, etc.
  • the external device or module before the configuration of the pin of the interface, the external device or module is read by the preset pin of the interface (the data pin of the I2C sub-interface).
  • the pre-stored information is configured, and the interface that is connected to the external device or the module is configured according to the pre-stored information, and the first device can perform interface configuration according to the pre-stored information of the external device or the module, thereby avoiding the prior art.
  • the interface After the interface is plugged in, it directly supplies power to each pin, which may cause equipment damage and other security risks, and improve the security of the device connection.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device. Having a series of operational steps performed on a computer or other programmable device to produce computer-implemented processing such that instructions executed on a computer or other programmable device are provided for implementing one or more processes and/or block diagrams in the flowchart. The steps of a function specified in a box or multiple boxes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

本申请提供了一种接口管脚配置的方法及装置,包括:第一设备通过接口的预设管脚读取外接设备或模块的预存信息;所述外接设备或模块通过所述接口与所述第一设备连接;所述预存信息包括:所述外接设备或模块的类型、供电方式或通信接口类型;根据所述预存信息配置所述接口的管脚。采用本申请的技术方案,能够避免现有技术中在接口插接好后直接为各引脚供电,可能导致的设备损坏等安全隐患,提高设备连接的安全性。

Description

一种接口管脚配置的方法及装置 技术领域
本申请涉及接口连接检测处理的技术领域,可以应用于云端智能机器人领域,特别涉及一种接口管脚配置的方法及装置。
背景技术
目前的方案是在设备或模块之间连接的接口插接完毕后,直接为接口的各引脚上电。
现有技术中在接口插接好后直接为各引脚供电,可能导致设备损坏等安全隐患。
发明内容
本申请实施例提出了一种接口管脚配置的方法及装置,用以现有的接口连接处理方案可能存在的安全隐患。
本申请实施例提供了一种接口管脚配置的方法,包括如下步骤:
第一设备通过接口的预设管脚读取外接设备或模块的预存信息;所述外接设备或模块通过所述接口与所述第一设备连接;所述预存信息包括:所述外接设备或模块的类型、供电方式或通信接口类型;
根据所述预存信息配置所述接口的管脚。
本申请实施例提供了一种接口管脚配置的装置,包括:
读取单元,用于通过接口的预设管脚读取外接设备或模块的预存信息;所述外接设备或模块通过所述接口与所述第一设备连接;所述预存信息包括:所述外接设备或模块的类型、供电方式或通信接口类型;
配置单元,用于根据所述预存信息配置所述接口的管脚。
本申请有益效果如下:
本申请实施例提供了一种接口管脚配置的方法及装置,由于是通过接通接口的预设管脚读取外接设备或模块的预存信息,并根据所述预存信息对第一设备与所述外接设备或模块连接的接口进行配置,第一设备可以根据所述外接设备或模块的预存信息进行接口配置,避免现有技术中在接口插接好后直接为各引脚供电,可能导致的设备损坏等安全隐患,提高设备连接的安全性。
附图说明
下面将参照附图描述本申请的具体实施例,
图1为本申请实施例中接口管脚配置的方法的流程示意图;
图2为本申请实施例中第一设备与外接设备或模块通过接口连接的示意图,其中,1为第一设备,2为接口,3为外接设备或模块;
图3为本申请实施例中的接口的布局结构示意图;
图4为本申请实施例中的接口管脚分布示意图;
图5为本申请实施例中接口管脚配置的装置的结构示意图;
图6为本申请实施例中接口管脚配置的实施流程示意图。
具体实施方式
为了使本申请的技术方案及优点更加清楚明白,以下结合附图对本申请的示例性实施例进行进一步详细的说明,显然,所描述的实施例仅是本申请的一部分实施例,而不是所有实施例的穷举。并且在不冲突的情况下,本说明书中的实施例及实施例中的特征可以互相结合。
图1为本申请实施例中接口管脚配置的方法的流程示意图,如图1所示,该接口管脚配置的方法可以包括如下步骤:
步骤101:第一设备通过接口的预设管脚读取外接设备或模块的预存信息;所述外接设备或模块通过所述接口与所述第一设备连接;所述预存信息包括:所述外接设备或模块的类型、供电方式或通信接口类型;
步骤102:根据所述预存信息配置所述接口的管脚。
具体实施中,第一设备可以为智能手持设备、云端智能机器人等等。
预设管脚可以是具有数据通信功能从外接设备读取预存信息的任何管脚,例如,可以是UART(Universal Asynchronous Receiver/Transmitter,通用异步收发传输器)子接口的数据管脚、USB(Universal Serial Bus,通用串行总线)子接口的数据管脚、I2C(Inter-Integrated Circuit,集成电路总线)子接口的数据管脚,或者其他的功能管脚,这里不做具体限定。
图2为本申请实施例中第一设备与外接设备或模块通过接口连接的示意图,如图2所示,在第一设备上1设有可以与外接设备或模块3连接的接口2,在外接设备或模块3上设有与接口2相匹配的接口,第一设备与外接设备或模块通过接口连接。
本申请实施例提供的接口管脚配置的方法,由于是通过接通接口的预设管脚读取外接设备或模块的预存信息,并根据所述预存信息对第一设备与所述外接设备或模块连接的接口进行配置,第一设备可以根据所述外接设备或模块的预存信息进行接口配置,避免现有技术中在接口插接好后直接为各引脚供电,可能导致的设备损坏等安全隐患,提高设备连接的安全性。
实施中,第一设备通过接口读取外接设备或模块的预存信息之前,还可以包括:
检测所述接口的插入检测子接口;
根据所述插入检测子接口的检测结果确定所述接口的全部管脚连接。
具体实施中,所述接口可以包括插入检测子接口,第一设备与外接设备或模块接口连接后,通过插入检测子接口可以判断所述接口的全部管脚是否 连接。
具体地,可以将所述接口的插入检测子接口的管脚和与外接设备或模块上设有的接口的GND(Ground,地)连接,第一设备检测插入检测子接口的管脚的电平,若为低电平,则说明所述接口的全部管脚已经与外接设备或模块上的接口连接;否则,说明所述接口的一个或多个管脚与外接设备或模块上的接口没有连接。
第一设备通过接口读取外接设备或模块的预存信息之前,通过插入检测子接口进行接口管脚的插入连接检测,可以确保接口正确连接后,再打开所述接口的预设管脚读取外接设备或模块的预存信息,避免出现接口连接不良时影响读取预存信息的问题。
实施中,第一设备通过接口的预设管脚读取外接设备或模块的预存信息,可以具体包括:
第一设备为所述接口的I2C子接口供电;
通过所述I2C子接口的数据管脚从所述外接设备或模块读取所述预存信息;所述预存信息预存至所述外接设备或模块的存储器中,通过所述I2C子接口的电源管脚为所述存储器供电。
具体实施中,I2C是一个双向的两线连续总线,提供集成电路之间的串行通信线路,采用一条数据线(SDA),加一条时钟线(SCL)来完成数据的传输及外围器件的扩展,由于I2C的寻址是软寻址方式,可以节省片选线。
预存信息的数据量通常不会特别大,I2C总线有三种数据传输速度:标准(100Kbps),快速模式(400Kbps)和高速模式(3.4Mbps),完全可以满足对预存信息读取的速度要求。
另外,由于存储预存信息的存储器由I2C子接口的电源管脚进行供电,而不是由外接设备或模块进行供电,这样在无需外接设备或模块上电也能正常使用,提高使用安全性。
实施中,根据所述预存信息配置所述接口的管脚之前,还可以包括:
根据所述外接设备或模块的类型确定所述第一设备允许连接所述外接设备或模块。
具体实施中,根据所述预存信息配置所述接口的管脚之前,还可以判断预存信息中的外接设备或模块的类型是否被第一设备允许连接。若确定所述第一设备允许连接所述外接设备或模块,则继续根据所述预存信息配置所述接口的管脚。通过确定外接设备或模块的类型是被第一设备允许连接的设备或模块类型,可以避免错误的设备连接,避免不必要的对所述接口的管脚的配置工作。
实施中,所述接口管脚配置的方法还可以包括:
若确定所述第一设备不允许连接所述外接设备或模块,则退出接口连接。
具体实施中,确定外接设备或模块的类型是被第一设备禁止连接或不能识别的设备或模块类型,则退出接口连接,不会对所述接口进行配置及上电,还可以上报故障信息,提示外接设备或模块是第一设备禁止连接或不能识别的设备或模块。
实施中,根据所述预存信息配置所述接口的管脚,可以具体包括:
根据所述预存信息中的供电方式,配置所述接口的各子接口的电源管脚的供电参数;
根据所述预存信息中的通信接口类型接通如下所述接口的通信子接口中的一个或多个:PCIE(Peripheral Component Interconnect Express,快捷外设互联标准)子接口、UART子接口、SIM(Subscriber Identity Module,客户识别模块)卡子接口、I2C子接口或USB子接口。
具体实施中,根据预存信息将外接设备或模块与第一设备连接通信所需的所述接口的管脚接通,管脚可以包括:I2C子接口、UART子接口、SIM 卡子接口、状态检测子接口、控制子接口等子接口中的电源管脚、或数据管脚等。并根据预存信息对各子接口的电源管脚的供电参数进行配置,其中供电参数可以包括:输入电压范围、输出电压、输出功率、效率等等。
根据预存信息中的供电方式确定外接设备或模块是由第一设备供电还是对第一设备供电,相应地,接通对外供电子接口或接通充电子接口,提高了设备供电的安全性。
实施中,所述预存信息还可以包括:所述外接设备或模块的属性信息,所述属性信息包括:主设备,或者从设备;
所述方法,还可以包括:
根据所述属性信息确定所述第一设备与所述外接设备或模块的主从关系。
具体实施中,在状态检测或控制等进程中,还涉及第一设备与所述外接设备或模块的主从关系的确定,所以,所述预存信息还可以包括所述外接设备或模块的属性信息,即,所述外接设备或模块为主设备或从设备。
若属性信息为主设备,则确定第一设备与所述外接设备或模块的主从关系为:第一设备为从设备,所述外接设备或模块为主设备;若属性信息为从设备,则确定第一设备与所述外接设备或模块的主从关系为:第一设备为主设备,所述外接设备或模块为从设备。
实施中,所述接口还可以包括:状态检测子接口、控制子接口、对外供电子接口、或充电子接口。
图3为本申请实施例中的接口的布局结构示意图,如图3所示,所述接口中的对外供电子接口是第一设备对外接设备或模块提供电源的子接口;充电子接口是可提供电源的外接设备或模块为第一设备提供电源的子接口;插入检测子接口为判断外接设备或模块是否正确插接到所述接口的子接口;PCIE子接口、USB子接口、UART子接口和I2C子接口分别为高、中、低 速通信子接口;SIM卡子接口为与具备无线通讯功能的外接设备或模块中SIM卡进行通信的子接口;状态检测子接口、控制子接口为检测、控制外接设备或模块的功能状态的接口,可以按照功能需求自由定义接口管脚数量和分布方式。
图4为本申请实施例中的接口管脚分布示意图,如图4所示,由于PCIE子接口,USB子接口,I2C子接口和UART子接口是目前设备连接中常用的通信接口,因此将这些子接口相互独立的定义在接口的相关管脚上。
管脚1~6属于对外供电子接口,管脚7和62属于插入检测子接口,管脚11、13、17、19、23、25、29、31、33属于PCIE子接口,管脚37和39属于UART子接口,管脚47、49、51、53、55属于SIM卡子接口,管脚59、61、63属于I2C子接口,管脚65~68属于充电子接口,管脚44、46、50、52、56、58属于USB子接口,管脚8、10、12、14、16、18、20、22、24、26、28、30、32、34、38、40属于状态检测子接口和控制子接口复用管脚。
为了降低数据管脚之间,尤其是高速率通信的数据管脚之间的干扰,可以在数据管脚之间设置GND管脚,例如,管脚9、15、21、27、35、36、42、45、48、54、57、60均为降低数据管脚之间干扰的GND管脚。
实施中,所述状态检测子接口与所述控制子接口可以复用同一数据管脚。
具体实施中,由于状态检测与控制通常不是同时进行的,所以可以将状态检测子接口与控制子接口可以复用同一数据管脚,以合理利用接口的管脚。
基于同一申请构思,本申请实施例中还提供了一种接口管脚配置的装置,由于该装置解决问题的原理与一种接口管脚配置的方法相似,因此该装置的实施可以参见方法的实施,重复之处不再赘述。
图5为本申请实施例中接口管脚配置的装置的结构示意图,如图5所示, 该接口管脚配置的装置可以包括:
读取单元501,用于通过接口的预设管脚读取外接设备或模块的预存信息;所述外接设备或模块通过所述接口与所述第一设备连接;所述预存信息包括:所述外接设备或模块的类型、供电方式或通信接口类型;
配置单元502,用于根据所述预存信息配置所述接口的管脚。
实施中,所述接口管脚配置的装置还可以包括:
检测单元,用于第一设备通过接口读取外接设备或模块的预存信息之前,检测所述接口的插入检测子接口;
连接确定单元,用于根据所述插入检测子接口的检测结果确定所述接口的全部管脚连接。
实施中,所述读取单元可以具体用于为所述接口的集成电路总线I2C子接口供电;通过所述I2C子接口的数据管脚从所述外接设备或模块读取所述预存信息;所述预存信息预存至所述外接设备或模块的存储器中,通过所述I2C子接口的电源管脚为所述存储器供电。
实施中,所述接口管脚配置的装置还可以包括:
允许连接确定单元,用于根据所述预存信息配置所述接口的管脚之前,根据所述外接设备或模块的类型确定所述第一设备允许连接所述外接设备或模块。
实施中,所述接口管脚配置的装置还可以包括:
退出连接单元,用于若确定所述第一设备不允许连接所述外接设备或模块,则退出接口连接。
实施中,所述配置单元可以具体用于根据所述预存信息中的供电方式,配置所述接口的各子接口的电源管脚的供电参数;根据所述预存信息中的通信接口类型接通如下所述接口的通信子接口中的一个或多个:PCIE子接口、UART子接口、SIM卡子接口、I2C子接口或USB子接口。
实施中,所述预存信息还可以包括:所述外接设备或模块的属性信息,所述属性信息包括:主设备,或者从设备;
所述装置,还可以包括:
主从关系确定单元,用于根据所述属性信息确定所述第一设备与所述外接设备或模块的主从关系。
实施中,所述接口还可以包括:状态检测子接口、控制子接口、对外供电子接口、或充电子接口。
实施中,所述状态检测子接口与所述控制子接口可以复用同一数据管脚。
为了描述的方便,以上所述装置的各部分以功能分为各种模块或单元分别描述。当然,在实施本申请时可以把各模块或单元的功能在同一个或多个软件或硬件中实现。
本发明实施例中的接口管脚配置的方法和装置,可应用于设备间接口连接时的接口管脚配置。图6为本申请实施例中接口管脚配置的实施流程示意图,如图6所示,下面结合一个具体的应用场景进行描述。连接接口后,首先通过插入检测子接口进行插入检测,确定接口的所有管脚是否连接?若没有,则退出接口连接;若是,则接通接口的I2C子接口。通过I2C子接口的数据管脚读取外接设备或模块的预存信息后,判断外接设备或模块的类型是否是第一设备允许连接的类型?若不是,则退出接口连接;若是,则读取预存信息中的外接设备或模块的供电方式。根据供电方式确定外接设备或模块是否由第一设备供电?若是,则接通对外供电子接口对外接设备或模块进行供电;否则,接通充电子接口,由外接设备或模块对第一设备进行供电。配置完外供电子接口或充电子接口后,读取预存信息中的通信接口类型。根据预存信息中的通信接口类型接通所述接口中的一个或多个通信子接口,其中,通信子接口可以包括:PCIE子接口、UART子接口、SIM卡子接口、I2C 子接口或USB子接口等等。
由上述实施例可见,在本申请实施例提供的技术方案中,在对接口的管脚配置之前,通过接通接口的预设管脚(I2C子接口的数据管脚)读取外接设备或模块的预存信息,并根据所述预存信息对第一设备与所述外接设备或模块连接的接口进行配置,第一设备可以根据所述外接设备或模块的预存信息进行接口配置,避免现有技术中在接口插接好后直接为各引脚供电,可能导致的设备损坏等安全隐患,提高设备连接的安全性。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上, 使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (18)

  1. 一种接口管脚配置的方法,其特征在于,包括如下步骤:
    第一设备通过接口的预设管脚读取外接设备或模块的预存信息;所述外接设备或模块通过所述接口与所述第一设备连接;所述预存信息包括:所述外接设备或模块的类型、供电方式或通信接口类型;
    根据所述预存信息配置所述接口的管脚。
  2. 如权利要求1所述的方法,其特征在于,第一设备通过接口读取外接设备或模块的预存信息之前,还包括:
    检测所述接口的插入检测子接口;
    根据所述插入检测子接口的检测结果确定所述接口的全部管脚连接。
  3. 如权利要求1所述的方法,其特征在于,第一设备通过接口的预设管脚读取外接设备或模块的预存信息,具体包括:
    第一设备为所述接口的集成电路总线I2C子接口供电;
    通过所述I2C子接口的数据管脚从所述外接设备或模块读取所述预存信息;所述预存信息预存至所述外接设备或模块的存储器中,通过所述I2C子接口的电源管脚为所述存储器供电。
  4. 如权利要求1所述的方法,其特征在于,根据所述预存信息配置所述接口的管脚之前,还包括:
    根据所述外接设备或模块的类型确定所述第一设备允许连接所述外接设备或模块。
  5. 如权利要求4所述的方法,其特征在于,还包括:
    若确定所述第一设备不允许连接所述外接设备或模块,则退出接口连接。
  6. 如权利要求1所述的方法,其特征在于,根据所述预存信息配置所述接口的管脚,具体包括:
    根据所述预存信息中的供电方式,配置所述接口的各子接口的电源管脚的供电参数;
    根据所述预存信息中的通信接口类型接通如下所述接口的通信子接口中的一个或多个:快捷外设互联标准PCIE子接口、通用异步收发传输器UART子接口、客户识别模块SIM卡子接口、I2C子接口或通用串行总线USB子接口。
  7. 如权利要求6所述的方法,其特征在于,所述预存信息还包括:所述外接设备或模块的属性信息,所述属性信息包括:主设备,或者从设备;
    所述方法,还包括:
    根据所述属性信息确定所述第一设备与所述外接设备或模块的主从关系。
  8. 如权利要求1所述的方法,其特征在于,所述接口还包括:状态检测子接口、控制子接口、对外供电子接口、或充电子接口。
  9. 如权利要8所述的方法,其特征在于,所述状态检测子接口与所述控制子接口复用同一数据管脚。
  10. 一种接口管脚配置的装置,其特征在于,包括:
    读取单元,用于通过接口的预设管脚读取外接设备或模块的预存信息; 所述外接设备或模块通过所述接口与所述第一设备连接;所述预存信息包括:所述外接设备或模块的类型、供电方式或通信接口类型;
    配置单元,用于根据所述预存信息配置所述接口的管脚。
  11. 如权利要求10所述的装置,其特征在于,还包括:
    检测单元,用于第一设备通过接口读取外接设备或模块的预存信息之前,检测所述接口的插入检测子接口;
    连接确定单元,用于根据所述插入检测子接口的检测结果确定所述接口的全部管脚连接。
  12. 如权利要求10所述的装置,其特征在于,所述读取单元具体用于为所述接口的集成电路总线I2C子接口供电;通过所述I2C子接口的数据管脚从所述外接设备或模块读取所述预存信息;所述预存信息预存至所述外接设备或模块的存储器中,通过所述I2C子接口的电源管脚为所述存储器供电。
  13. 如权利要求10所述的装置,其特征在于,还包括:
    允许连接确定单元,用于根据所述预存信息配置所述接口的管脚之前,根据所述外接设备或模块的类型确定所述第一设备允许连接所述外接设备或模块。
  14. 如权利要求13所述的装置,其特征在于,还包括:
    退出连接单元,用于若确定所述第一设备不允许连接所述外接设备或模块,则退出接口连接。
  15. 如权利要求10所述的装置,其特征在于,所述配置单元具体用于根据所述预存信息中的供电方式,配置所述接口的各子接口的电源管脚的供电 参数;根据所述预存信息中的通信接口类型接通如下所述接口的通信子接口中的一个或多个:PCIE子接口、通用异步收发传输器UART子接口、客户识别模块SIM卡子接口、I2C子接口或通用串行总线USB子接口。
  16. 如权利要求15所述的装置,其特征在于,所述预存信息还包括:所述外接设备或模块的属性信息,所述属性信息包括:主设备,或者从设备;
    所述装置,还包括:
    主从关系确定单元,用于根据所述属性信息确定所述第一设备与所述外接设备或模块的主从关系。
  17. 如权利要求10所述的装置,其特征在于,所述接口还包括:状态检测子接口、控制子接口、对外供电子接口、或充电子接口。
  18. 如权利要17所述的装置,其特征在于,所述状态检测子接口与所述控制子接口复用同一数据管脚。
PCT/CN2017/071011 2016-01-08 2017-01-12 一种接口管脚配置的方法及装置 Ceased WO2017118441A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610012976.XA CN105677420B (zh) 2016-01-08 2016-01-08 一种接口管脚配置的方法及装置
CN201610012976.X 2016-01-08

Publications (1)

Publication Number Publication Date
WO2017118441A1 true WO2017118441A1 (zh) 2017-07-13

Family

ID=56299713

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/071011 Ceased WO2017118441A1 (zh) 2016-01-08 2017-01-12 一种接口管脚配置的方法及装置

Country Status (2)

Country Link
CN (1) CN105677420B (zh)
WO (1) WO2017118441A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116352703A (zh) * 2023-02-20 2023-06-30 上海交通大学 一种机器人及其外接模块扩展连接方法

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677420B (zh) * 2016-01-08 2020-01-31 深圳前海达闼云端智能科技有限公司 一种接口管脚配置的方法及装置
CN108228129A (zh) * 2018-01-31 2018-06-29 小派科技(上海)有限责任公司 接口数据处理方法及装置
CN108549477B (zh) * 2018-03-28 2020-12-18 联想(北京)有限公司 一种功率调整方法及电子设备
CN108874713B (zh) * 2018-05-31 2021-10-22 联想(北京)有限公司 一种信息处理方法及装置
CN109062840A (zh) * 2018-07-25 2018-12-21 合肥联宝信息技术有限公司 一种复用接口管脚的方法及装置
TWI704734B (zh) * 2018-10-12 2020-09-11 技嘉科技股份有限公司 外接式電連接器及電腦系統
CN111048928B (zh) * 2018-10-12 2021-09-17 技嘉科技股份有限公司 外接式电连接器及电脑系统
CN113525088B (zh) * 2020-04-21 2024-07-12 北京新能源汽车股份有限公司 副仪表板总成、检测方法及具有该副仪表板总成的车辆
CN113525085A (zh) * 2020-04-21 2021-10-22 北京新能源汽车股份有限公司 副仪表板总成、检测方法、电连接器和车辆
CN113525087A (zh) * 2020-04-21 2021-10-22 北京新能源汽车股份有限公司 车辆及其控制方法、副仪表板总成及计算机可读存储介质
CN113525086B (zh) * 2020-04-21 2024-04-16 北京新能源汽车股份有限公司 副仪表板总成、控制方法、存储介质及车辆
CN112165136B (zh) * 2020-09-30 2023-05-19 努比亚技术有限公司 一种充电接口装置和移动终端

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101478598A (zh) * 2009-01-23 2009-07-08 中兴通讯股份有限公司 移动终端与智能卡的通信协商方法和移动终端
CN102572352A (zh) * 2011-12-26 2012-07-11 中兴通讯股份有限公司 Hdmi复用方法、hdmi、以及带有hdmi的设备
CN103763392A (zh) * 2014-01-29 2014-04-30 百度在线网络技术(北京)有限公司 设备的控制方法、装置及系统
US20150142898A1 (en) * 2013-11-20 2015-05-21 Tyco Fire & Security Gmbh Cloud-based method and apparatus for configuring a fire panel
CN105677420A (zh) * 2016-01-08 2016-06-15 深圳前海达闼云端智能科技有限公司 一种接口管脚配置的方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1318988C (zh) * 2002-07-31 2007-05-30 光宝科技股份有限公司 以一转换器侦测并转换非通用串行总线装置的方法及系统
US20080188133A1 (en) * 2007-02-02 2008-08-07 Yun-Hsiu Lee Mini card adapter structure
CN101163050A (zh) * 2007-11-23 2008-04-16 上海华为技术有限公司 设备近端维护方法、系统和设备
CN101446934A (zh) * 2008-11-28 2009-06-03 成都市华为赛门铁克科技有限公司 一种区分接口的方法、装置和系统
CN102193503A (zh) * 2010-03-15 2011-09-21 研祥智能科技股份有限公司 一种工控主板及其识别外接设备的方法
US9336170B2 (en) * 2010-05-11 2016-05-10 Mediatek Inc. Universal serial bus device and charging and enumeration method
CN102289873A (zh) * 2011-05-24 2011-12-21 张苹 一种具有地图功能的自动贩卖机

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101478598A (zh) * 2009-01-23 2009-07-08 中兴通讯股份有限公司 移动终端与智能卡的通信协商方法和移动终端
CN102572352A (zh) * 2011-12-26 2012-07-11 中兴通讯股份有限公司 Hdmi复用方法、hdmi、以及带有hdmi的设备
US20150142898A1 (en) * 2013-11-20 2015-05-21 Tyco Fire & Security Gmbh Cloud-based method and apparatus for configuring a fire panel
CN103763392A (zh) * 2014-01-29 2014-04-30 百度在线网络技术(北京)有限公司 设备的控制方法、装置及系统
CN105677420A (zh) * 2016-01-08 2016-06-15 深圳前海达闼云端智能科技有限公司 一种接口管脚配置的方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116352703A (zh) * 2023-02-20 2023-06-30 上海交通大学 一种机器人及其外接模块扩展连接方法

Also Published As

Publication number Publication date
CN105677420A (zh) 2016-06-15
CN105677420B (zh) 2020-01-31

Similar Documents

Publication Publication Date Title
CN105677420B (zh) 一种接口管脚配置的方法及装置
US9059906B1 (en) Data communication interface
CN106104506B (zh) 用于在usb c型接口中进入附件对接模式的方法、装置和计算机程序产品
CN103616937B (zh) 一种主板、pcie网卡和服务器系统
US8762746B1 (en) Power management in electronic devices
CN107480086B (zh) 终端及其控制方法
CN103544122B (zh) 一种接口自适应匹配的协同系统及其协同方法
CN102147782B (zh) 主从设备通信电路及其id地址分配方法
CN109213530A (zh) 一种基于usb的通信连接方法、移动终端及存储介质
CN102855202A (zh) 一种电子设备、数据接口类型的检测方法
KR20210034431A (ko) 외부 장치와의 연결을 지원하는 전자 장치 및 그 외부 장치와 연결하여 사용할 때 소모 전류를 감소시키는 방법
US20170371684A1 (en) Pin control method and device
WO2013174125A1 (zh) 单板通讯方法、系统和单板
CN102890662A (zh) 通过对usb hid设备进行二次枚举以识别主机操作系统的方法
CN104090855A (zh) Usb接口的usb模式和mhl模式的兼容方法和装置
CN105677596B (zh) 一种控制方法及电子设备
CN105048018B (zh) 一种具有数据交换功能的终端的充电方法和装置
US20130283028A1 (en) Adapter identification system and method for computer
CN102073602A (zh) 计算机系统、连接控制装置及连接与断开方法
CN103778092A (zh) Usb和sd接口复用电路及复用方法
CN112799985B (zh) Usb接口控制方法、usb控制电路及智能网联设备主板
US9331492B2 (en) Detection control device and method thereof
EP3629428A1 (en) Method and apparatus for changing impedance of terminal included in connector
JP2016054367A (ja) マスター・スレーブネットワーク装置
CN105373422B (zh) 控制终端设备进入下载模式的方法、终端设备及计算机设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17735879

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25/10/2018)

122 Ep: pct application non-entry in european phase

Ref document number: 17735879

Country of ref document: EP

Kind code of ref document: A1