This application claims priority to Chinese Patent Application No. 201410393943.5 Aug. 12, 2014, the contents of which are incorporated by reference herein.
The subject matter herein generally relates to an electronic device and a method of rotating the electronic device.
A method of rotating an electronic device may be used to control the electronic device to rotate.
Implementations of the present technology will now be described, by way of example only, with reference to the attached figures.
It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, components have not been described in detail so as not to obscure the related relevant feature being described. Also, the description is not to be considered as limiting the scope of the embodiments described herein. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features of the present disclosure.
A definition that applies throughout this disclosure will now be presented.
The term “comprising,” when utilized, means “including, but not necessarily limited to”; it specifically indicates open-ended inclusion or membership in the so-described combination, group, series, and the like.
The present disclosure is described in relation to an electronic device and a method of rotating the electronic device.
The processing module 20 comprises a receiving unit 21, a reading unit 23, a resetting unit 25, a storing unit 27, and a control unit 29. The receiving unit 21 is configured to receive the rotation signal from the sensing module 10. The reading unit 23 is configured to read the rotation signal from the receiving unit 21 and transform the rotation signal to a current value. The storing unit 27 is configured to store a first address value, a second address value, a control value, and a reference value. The control unit 29 is configured to receive the reference value according to the first address value and receive the control value according to the second address value. The control unit 29 is also configured to compare the reference value with the control value. The resetting unit 25 is configured to reset the control value to the current value.
At block 201, the sensing module 10 senses the electronic device rotating, receives a rotation signal and sends the rotation signal to the receiving unit 20.
At block 202, the receiving unit 21 sends the rotation signal to the reading unit 23.
At block 203, the reading unit 23 reads the rotation signal, transforms the rotation signal to the current value and sends the current value to the resetting unit 25 and the control unit 29.
At block 204, the control unit 29 compares the reference value with the current value after receiving the reference value according to the first address value and receiving the control value according to the second address value, goes to step 205 when the reference value is not equal to the current value; and goes on step 207 when the reference value is equal to the current value.
At block 205, the resetting unit 25 resets the control value to the current value when the control unit 29 determines the reference value is not equal to the current value.
At block 206, the control unit 29 receives the control value according to the second address value and controls the screen of the electronic device to rotate.
At block 207, the control unit 29 controls the screen of the electronic device to not rotate.
In the electronic device, the resetting unit 25 resets the control value to the current value when the control unit 29 determines the reference value is not equal to the current value. The control unit 29 receives the control value according to the second address value. Thereby the control unit 29 controls the screen of the electronic device to rotate.
It is to be understood that even though numerous characteristics and advantages have been set forth in the foregoing description of embodiments, together with details of the structures and functions of the embodiments, the disclosure is illustrative only and changes may be made in detail, including in the matters of shape, size, and arrangement of parts within the principles of the disclosure to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed.
Number | Date | Country | Kind |
---|---|---|---|
201410393943.5 | Aug 2014 | CN | national |