From 0a37c2f7c92ca6b0b6357271b02fb871e0afcbdc Mon Sep 17 00:00:00 2001 From: mickeyl Date: Fri, 19 May 2006 12:22:12 +0000 Subject: add preliminary support for the Motorola EZX Linux phone platform see http://openezx.org --- (limited to 'libopie2/opiecore/device/odevice_motorola_ezx.h') diff --git a/libopie2/opiecore/device/odevice_motorola_ezx.h b/libopie2/opiecore/device/odevice_motorola_ezx.h new file mode 100644 index 0000000..c0bd6c7 --- a/dev/null +++ b/libopie2/opiecore/device/odevice_motorola_ezx.h @@ -0,0 +1,102 @@ +/* +                 This file is part of the Opie Project + =. (C) 2006 Michael 'Mickey' Lauer + .=l. +           .>+-= + _;:,     .>    :=|. This program is free software; you can +.> <`_,   >  .   <= redistribute it and/or modify it under +:`=1 )Y*s>-.--   : the terms of the GNU Library General Public +.="- .-=="i,     .._ License as published by the Free Software + - .   .-<_>     .<> Foundation; version 2 of the License. +     ._= =}       : +    .%`+i>       _;_. +    .i_,=:_.      -`: PARTICULAR PURPOSE. See the GNU +..}^=.=       =       ; Library General Public License for more +++=   -.     .`     .: details. + :     =  ...= . :.=- + -.   .:....=;==+<; You should have received a copy of the GNU +  -_. . .   )=.  = Library General Public License along with +    --        :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#ifndef ODEVICE_MOTOROLA_EZX +#define ODEVICE_MOTOROLA_EZX + +#include "odevice_abstractmobiledevice.h" + +/* QT */ +#include +#include + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#endif + +// Audio +// LED +// Power Management +#define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) +#define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) +#define APM_EVT_POWER_BUTTON (1 << 0) + +// Vesa Standard +#define FB_BLANK_UNBLANK 0 +#define FB_BLANK_POWERDOWN 4 + +namespace Opie { +namespace Core { +namespace Internal { + +class Motorola_EZX : public OAbstractMobileDevice +{ + Q_OBJECT + + protected: + virtual void init(const QString&); + virtual void initButtons(); + //void initHingeSensor(); + + protected slots: + //void hingeSensorTriggered(); + void systemMessage( const QCString &msg, const QByteArray & ); + + public: + virtual bool setDisplayBrightness( int b ); + virtual bool setDisplayStatus( bool on ); + virtual int displayBrightnessResolution() const; + + virtual void playAlarmSound(); + + virtual QValueList ledList() const; + virtual QValueList ledStateList ( OLed led ) const; + virtual OLedState ledState( OLed led ) const; + virtual bool setLedState( OLed led, OLedState st ); + + virtual bool suspend(); + + protected: + QString m_backlightdev; + OLedState m_leds[1]; + QFile m_hinge; +}; + +struct ezx_button { + Qt::Key code; + char *utext; + char *pix; + char *fpressedservice; + char *fpressedaction; + char *fheldservice; + char *fheldaction; +}; +} +} +} +#endif -- cgit v0.9.0.2