Prevent deep sleep on the Openmoko

This commit is contained in:
Pierre Pronchery 2010-06-12 21:07:42 +00:00
parent 308e31596d
commit fad8aa3c2a

View File

@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* TODO:
* - implement notification light
* - prevent deep sleep */
* - implement notification lights */
@ -110,12 +109,12 @@ static int _openmoko_event(PhonePlugin * plugin, PhoneEvent event, ...)
case PHONE_EVENT_VIBRATOR_ON:
_event_vibrator(plugin, TRUE);
break;
/* not relevant */
case PHONE_EVENT_SIM_VALID: /* FIXME prevent deep sleep? */
case PHONE_EVENT_SMS_RECEIVED:
case PHONE_EVENT_SMS_RECEIVING:
case PHONE_EVENT_SMS_SENDING:
case PHONE_EVENT_SMS_SENT:
case PHONE_EVENT_SIM_VALID:
/* prevent deep sleep */
plugin->helper->queue(plugin->helper->phone,
"AT%SLEEP=2");
break;
default: /* not relevant */
break;
}
return 0;