主权项 |
1. An electronic device comprising:
a communication line; a power line; a first connector comprising a plurality of contacts including a data contact and a power contact, the first connector configured to mate with a second connector of a second device and couple the communication line and the power line between the electronic device and the second device with the data contact and the power contact, respectively; communication circuitry coupled to the data contact that enables the device to exchange data with a second electronic device over the communication line using a predetermined communication protocol in which data pulses having a pulse width carry information, wherein the pulse width is characterized by, as the data line transitions from a first state to a second state and back to the first state, a length of time in which the data line is in the second state, and wherein the communication protocol transmits information to the second device using a predetermined set of different data pulse types, each data pulse type in the predetermined set of data pulse types having a different pulse width; power control circuitry coupled to the power contact and the communication line and configured to provide power to the second device over the power contact, the power control circuitry further configured to, while the first connector is coupled to the second connector and the data contact is physically coupled to a corresponding data contact in the second connector:
monitor the communication line to determine whether the communication line is in the first or the second state;determine whether a connector disconnection event occurred based on whether the communication line remains in the second state longer than a duration of the pulse width of any of the data pulse types in the predetermined set of data pulse types; andreduce an amount of current provided over the power line upon determining a connector disconnection event occurred. |