Patent ID: 7503779

Claim:
An electronic device having a foldable plug, said electronic device comprising: a casing having multiple support members, multiple perforations and multiple receiving parts; a plug having a rotating shaft and multiple pins, said rotating shaft including a ratchet tenon and being pivotally supported on said support members such that said pins are rotatable with respect to said rotating shaft to at least a first position and a second position, wherein said pins are penetrated through said perforation and substantially perpendicular to said casing when said pins are rotated to said first position, and said pins are received in said receiving parts of said casing when said pins are rotated to said second position; a circuit board disposed within said casing and including multiple contact elements corresponding to said pins; a retaining element adjacent to said rotating shaft of said plug and including a ratchet part, wherein said ratchet part is engageable with said ratchet tenon of said rotating shaft; and a resilient element contacted with or sustained against said retaining element for providing a restoring force on said retaining element, wherein said ratchet part is engaged with said ratchet tenon of said rotating shaft due to said restoring force, so that said pins are automatically fixed in either said first position or said second position.