-rw-r--r-- | libopie/odevice.cpp | 61 | ||||
-rw-r--r-- | libopie/odevice.h | 10 |
2 files changed, 65 insertions, 6 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index f808960..4b5a54e 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -59,32 +59,33 @@ public: | |||
59 | QString m_vendorstr; | 59 | QString m_vendorstr; |
60 | OVendor m_vendor; | 60 | OVendor m_vendor; |
61 | 61 | ||
62 | QString m_modelstr; | 62 | QString m_modelstr; |
63 | OModel m_model; | 63 | OModel m_model; |
64 | 64 | ||
65 | QString m_systemstr; | 65 | QString m_systemstr; |
66 | OSystem m_system; | 66 | OSystem m_system; |
67 | 67 | ||
68 | QString m_sysverstr; | 68 | QString m_sysverstr; |
69 | 69 | ||
70 | Transformation m_rotation; | 70 | Transformation m_rotation; |
71 | ODirection m_direction; | 71 | ODirection m_direction; |
72 | 72 | ||
73 | QValueList <ODeviceButton> *m_buttons; | 73 | QValueList <ODeviceButton> *m_buttons; |
74 | uint m_holdtime; | 74 | uint m_holdtime; |
75 | QStrList *m_cpu_frequencies; | ||
75 | }; | 76 | }; |
76 | 77 | ||
77 | 78 | ||
78 | class iPAQ : public ODevice, public QWSServer::KeyboardFilter { | 79 | class iPAQ : public ODevice, public QWSServer::KeyboardFilter { |
79 | protected: | 80 | protected: |
80 | virtual void init ( ); | 81 | virtual void init ( ); |
81 | virtual void initButtons ( ); | 82 | virtual void initButtons ( ); |
82 | 83 | ||
83 | public: | 84 | public: |
84 | virtual bool setSoftSuspend ( bool soft ); | 85 | virtual bool setSoftSuspend ( bool soft ); |
85 | 86 | ||
86 | virtual bool setDisplayBrightness ( int b ); | 87 | virtual bool setDisplayBrightness ( int b ); |
87 | virtual int displayBrightnessResolution ( ) const; | 88 | virtual int displayBrightnessResolution ( ) const; |
88 | 89 | ||
89 | virtual void alarmSound ( ); | 90 | virtual void alarmSound ( ); |
90 | 91 | ||
@@ -410,32 +411,33 @@ ODevice *ODevice::inst ( ) | |||
410 | ODevice::ODevice ( ) | 411 | ODevice::ODevice ( ) |
411 | { | 412 | { |
412 | d = new ODeviceData; | 413 | d = new ODeviceData; |
413 | 414 | ||
414 | d-> m_modelstr = "Unknown"; | 415 | d-> m_modelstr = "Unknown"; |
415 | d-> m_model = Model_Unknown; | 416 | d-> m_model = Model_Unknown; |
416 | d-> m_vendorstr = "Unknown"; | 417 | d-> m_vendorstr = "Unknown"; |
417 | d-> m_vendor = Vendor_Unknown; | 418 | d-> m_vendor = Vendor_Unknown; |
418 | d-> m_systemstr = "Unknown"; | 419 | d-> m_systemstr = "Unknown"; |
419 | d-> m_system = System_Unknown; | 420 | d-> m_system = System_Unknown; |
420 | d-> m_sysverstr = "0.0"; | 421 | d-> m_sysverstr = "0.0"; |
421 | d-> m_rotation = Rot0; | 422 | d-> m_rotation = Rot0; |
422 | d-> m_direction = CW; | 423 | d-> m_direction = CW; |
423 | 424 | ||
424 | d-> m_holdtime = 1000; // 1000ms | 425 | d-> m_holdtime = 1000; // 1000ms |
425 | d-> m_buttons = 0; | 426 | d-> m_buttons = 0; |
427 | d-> m_cpu_frequencies = new QStrList; | ||
426 | } | 428 | } |
427 | 429 | ||
428 | void ODevice::systemMessage ( const QCString &msg, const QByteArray & ) | 430 | void ODevice::systemMessage ( const QCString &msg, const QByteArray & ) |
429 | { | 431 | { |
430 | if ( msg == "deviceButtonMappingChanged()" ) { | 432 | if ( msg == "deviceButtonMappingChanged()" ) { |
431 | reloadButtonMapping ( ); | 433 | reloadButtonMapping ( ); |
432 | } | 434 | } |
433 | } | 435 | } |
434 | 436 | ||
435 | void ODevice::init ( ) | 437 | void ODevice::init ( ) |
436 | { | 438 | { |
437 | } | 439 | } |
438 | 440 | ||
439 | /** | 441 | /** |
440 | * This method initialises the button mapping | 442 | * This method initialises the button mapping |
441 | */ | 443 | */ |
@@ -760,32 +762,72 @@ bool ODevice::hasLightSensor ( ) const | |||
760 | * @return a value from the light senso | 762 | * @return a value from the light senso |
761 | */ | 763 | */ |
762 | int ODevice::readLightSensor ( ) | 764 | int ODevice::readLightSensor ( ) |
763 | { | 765 | { |
764 | return -1; | 766 | return -1; |
765 | } | 767 | } |
766 | 768 | ||
767 | /** | 769 | /** |
768 | * @return the light sensor resolution whatever that is ;) | 770 | * @return the light sensor resolution whatever that is ;) |
769 | */ | 771 | */ |
770 | int ODevice::lightSensorResolution ( ) const | 772 | int ODevice::lightSensorResolution ( ) const |
771 | { | 773 | { |
772 | return 0; | 774 | return 0; |
773 | } | 775 | } |
774 | 776 | ||
775 | /** | 777 | /** |
778 | * @return a list with valid CPU frequency | ||
779 | */ | ||
780 | QStrList &ODevice::cpuFrequencies ( ) const | ||
781 | { | ||
782 | qWarning("ODevice::cpuFrequencies: m_cpu_frequencies is %d", (int) d->m_cpu_frequencies); | ||
783 | return *d->m_cpu_frequencies; | ||
784 | } | ||
785 | |||
786 | |||
787 | /** | ||
788 | * Set desired cpu frequency | ||
789 | * | ||
790 | * @param index index into d->m_cpu_frequencies of the frequency to be set | ||
791 | */ | ||
792 | bool ODevice::setCpuFrequency(uint index) | ||
793 | { | ||
794 | if (index >= d->m_cpu_frequencies->count()) | ||
795 | return false; | ||
796 | |||
797 | char *freq = d->m_cpu_frequencies->at(index); | ||
798 | qWarning("set freq to %s", freq); | ||
799 | |||
800 | //TODO: do the change in /proc/sys/cpu/0/speed | ||
801 | |||
802 | return false; | ||
803 | } | ||
804 | |||
805 | /** | ||
806 | * Returns current frequency index out of d->m_cpu_frequencies | ||
807 | */ | ||
808 | uint ODevice::cpuFrequency() const | ||
809 | { | ||
810 | // TODO: get freq from /proc/sys/cpu/0/speed and return index | ||
811 | |||
812 | return 0; | ||
813 | } | ||
814 | |||
815 | |||
816 | |||
817 | /** | ||
776 | * @return a list of hardware buttons | 818 | * @return a list of hardware buttons |
777 | */ | 819 | */ |
778 | const QValueList <ODeviceButton> &ODevice::buttons ( ) | 820 | const QValueList <ODeviceButton> &ODevice::buttons ( ) |
779 | { | 821 | { |
780 | initButtons ( ); | 822 | initButtons ( ); |
781 | 823 | ||
782 | return *d-> m_buttons; | 824 | return *d-> m_buttons; |
783 | } | 825 | } |
784 | 826 | ||
785 | /** | 827 | /** |
786 | * @return The amount of time that would count as a hold | 828 | * @return The amount of time that would count as a hold |
787 | */ | 829 | */ |
788 | uint ODevice::buttonHoldTime ( ) const | 830 | uint ODevice::buttonHoldTime ( ) const |
789 | { | 831 | { |
790 | return d-> m_holdtime; | 832 | return d-> m_holdtime; |
791 | } | 833 | } |
@@ -1937,32 +1979,37 @@ void Ramses::init() | |||
1937 | d->m_holdtime = 1000; | 1979 | d->m_holdtime = 1000; |
1938 | 1980 | ||
1939 | f.setName("/etc/oz_version"); | 1981 | f.setName("/etc/oz_version"); |
1940 | 1982 | ||
1941 | if (f.open(IO_ReadOnly)) { | 1983 | if (f.open(IO_ReadOnly)) { |
1942 | d->m_systemstr = "OpenEmbedded/Ramses"; | 1984 | d->m_systemstr = "OpenEmbedded/Ramses"; |
1943 | d->m_system = System_OpenZaurus; | 1985 | d->m_system = System_OpenZaurus; |
1944 | 1986 | ||
1945 | QTextStream ts(&f); | 1987 | QTextStream ts(&f); |
1946 | ts.setDevice(&f); | 1988 | ts.setDevice(&f); |
1947 | d->m_sysverstr = ts.readLine(); | 1989 | d->m_sysverstr = ts.readLine(); |
1948 | f.close(); | 1990 | f.close(); |
1949 | } | 1991 | } |
1950 | 1992 | ||
1951 | m_power_timer = 0; | 1993 | m_power_timer = 0; |
1952 | 1994 | ||
1995 | qWarning("adding freq"); | ||
1996 | d->m_cpu_frequencies->append("100"); | ||
1997 | d->m_cpu_frequencies->append("200"); | ||
1998 | d->m_cpu_frequencies->append("300"); | ||
1999 | d->m_cpu_frequencies->append("400"); | ||
1953 | } | 2000 | } |
1954 | 2001 | ||
1955 | bool Ramses::filter(int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat) | 2002 | bool Ramses::filter(int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat) |
1956 | { | 2003 | { |
1957 | Q_UNUSED( keycode ); | 2004 | Q_UNUSED( keycode ); |
1958 | Q_UNUSED( modifiers ); | 2005 | Q_UNUSED( modifiers ); |
1959 | Q_UNUSED( isPress ); | 2006 | Q_UNUSED( isPress ); |
1960 | Q_UNUSED( autoRepeat ); | 2007 | Q_UNUSED( autoRepeat ); |
1961 | return false; | 2008 | return false; |
1962 | } | 2009 | } |
1963 | 2010 | ||
1964 | void Ramses::timerEvent(QTimerEvent *) | 2011 | void Ramses::timerEvent(QTimerEvent *) |
1965 | { | 2012 | { |
1966 | killTimer(m_power_timer); | 2013 | killTimer(m_power_timer); |
1967 | m_power_timer = 0; | 2014 | m_power_timer = 0; |
1968 | QWSServer::sendKeyEvent(-1, HardKey_Backlight, 0, true, false); | 2015 | QWSServer::sendKeyEvent(-1, HardKey_Backlight, 0, true, false); |
@@ -1997,32 +2044,33 @@ bool Ramses::setSoftSuspend(bool soft) | |||
1997 | perror("APM_IOCGEVTSRC"); | 2044 | perror("APM_IOCGEVTSRC"); |
1998 | 2045 | ||
1999 | ::close(fd); | 2046 | ::close(fd); |
2000 | } | 2047 | } |
2001 | else | 2048 | else |
2002 | perror("/dev/apm_bios or /dev/misc/apm_bios"); | 2049 | perror("/dev/apm_bios or /dev/misc/apm_bios"); |
2003 | 2050 | ||
2004 | return res; | 2051 | return res; |
2005 | #else | 2052 | #else |
2006 | return true; | 2053 | return true; |
2007 | #endif | 2054 | #endif |
2008 | } | 2055 | } |
2009 | 2056 | ||
2010 | bool Ramses::suspend ( ) | 2057 | bool Ramses::suspend ( ) |
2011 | { | 2058 | { |
2012 | qDebug("Ramses::suspend"); | 2059 | qDebug("Ramses::suspend"); |
2060 | return false; | ||
2013 | } | 2061 | } |
2014 | 2062 | ||
2015 | /** | 2063 | /** |
2016 | * This sets the display on or off | 2064 | * This sets the display on or off |
2017 | */ | 2065 | */ |
2018 | bool Ramses::setDisplayStatus(bool on) | 2066 | bool Ramses::setDisplayStatus(bool on) |
2019 | { | 2067 | { |
2020 | qDebug("Ramses::setDisplayStatus(%d)", on); | 2068 | qDebug("Ramses::setDisplayStatus(%d)", on); |
2021 | #if 0 | 2069 | #if 0 |
2022 | bool res = false; | 2070 | bool res = false; |
2023 | int fd; | 2071 | int fd; |
2024 | 2072 | ||
2025 | if ((fd = ::open ("/dev/fb/0", O_RDWR)) >= 0) { | 2073 | if ((fd = ::open ("/dev/fb/0", O_RDWR)) >= 0) { |
2026 | res = (::ioctl(fd, FBIOBLANK, on ? VESA_NO_BLANKING : VESA_POWERDOWN) == 0); | 2074 | res = (::ioctl(fd, FBIOBLANK, on ? VESA_NO_BLANKING : VESA_POWERDOWN) == 0); |
2027 | ::close(fd); | 2075 | ::close(fd); |
2028 | } | 2076 | } |
@@ -2035,42 +2083,49 @@ bool Ramses::setDisplayStatus(bool on) | |||
2035 | 2083 | ||
2036 | /* | 2084 | /* |
2037 | * We get something between 0..255 into us | 2085 | * We get something between 0..255 into us |
2038 | */ | 2086 | */ |
2039 | bool Ramses::setDisplayBrightness(int bright) | 2087 | bool Ramses::setDisplayBrightness(int bright) |
2040 | { | 2088 | { |
2041 | qDebug("Ramses::setDisplayBrightness(%d)", bright); | 2089 | qDebug("Ramses::setDisplayBrightness(%d)", bright); |
2042 | bool res = false; | 2090 | bool res = false; |
2043 | int fd; | 2091 | int fd; |
2044 | 2092 | ||
2045 | // pwm1 brighness: 20 steps 500..0 (dunkel->hell) | 2093 | // pwm1 brighness: 20 steps 500..0 (dunkel->hell) |
2046 | 2094 | ||
2047 | if (bright > 255 ) | 2095 | if (bright > 255 ) |
2048 | bright = 255; | 2096 | bright = 255; |
2049 | if (bright < 0) | 2097 | if (bright < 0) |
2050 | bright = 0; | 2098 | bright = 0; |
2051 | bright = 500-(bright * 500 / 255); | ||
2052 | 2099 | ||
2100 | // Turn backlight completely off | ||
2101 | if ((fd = ::open("/proc/sys/board/lcd_backlight", O_WRONLY)) >= 0) { | ||
2102 | char writeCommand[10]; | ||
2103 | const int count = sprintf(writeCommand, "%d\n", bright ? 1 : 0); | ||
2104 | res = (::write(fd, writeCommand, count) != -1); | ||
2105 | ::close(fd); | ||
2106 | } | ||
2107 | |||
2108 | // scale backlight brightness to hardware | ||
2109 | bright = 500-(bright * 500 / 255); | ||
2053 | if ((fd = ::open("/proc/sys/board/pwm1", O_WRONLY)) >= 0) { | 2110 | if ((fd = ::open("/proc/sys/board/pwm1", O_WRONLY)) >= 0) { |
2054 | qDebug(" %d -> pwm1", bright); | 2111 | qDebug(" %d -> pwm1", bright); |
2055 | char writeCommand[100]; | 2112 | char writeCommand[100]; |
2056 | const int count = sprintf(writeCommand, "%d\n", bright); | 2113 | const int count = sprintf(writeCommand, "%d\n", bright); |
2057 | res = (::write(fd, writeCommand, count) != -1); | 2114 | res = (::write(fd, writeCommand, count) != -1); |
2058 | ::close(fd); | 2115 | ::close(fd); |
2059 | } else { | ||
2060 | qWarning("no write"); | ||
2061 | } | 2116 | } |
2062 | return res; | 2117 | return res; |
2063 | } | 2118 | } |
2064 | 2119 | ||
2065 | 2120 | ||
2066 | int Ramses::displayBrightnessResolution() const | 2121 | int Ramses::displayBrightnessResolution() const |
2067 | { | 2122 | { |
2068 | return 32; | 2123 | return 32; |
2069 | } | 2124 | } |
2070 | 2125 | ||
2071 | bool Ramses::setDisplayContrast(int contr) | 2126 | bool Ramses::setDisplayContrast(int contr) |
2072 | { | 2127 | { |
2073 | qDebug("Ramses::setDisplayContrast(%d)", contr); | 2128 | qDebug("Ramses::setDisplayContrast(%d)", contr); |
2074 | bool res = false; | 2129 | bool res = false; |
2075 | int fd; | 2130 | int fd; |
2076 | 2131 | ||
diff --git a/libopie/odevice.h b/libopie/odevice.h index 0974e8d..7f6f856 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -10,32 +10,33 @@ | |||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | Library General Public License for more details. | 12 | Library General Public License for more details. |
13 | 13 | ||
14 | You should have received a copy of the GNU Library General Public License | 14 | You should have received a copy of the GNU Library General Public License |
15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to |
16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
17 | Boston, MA 02111-1307, USA. | 17 | Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #ifndef _LIBOPIE_ODEVICE_H_ | 20 | #ifndef _LIBOPIE_ODEVICE_H_ |
21 | #define _LIBOPIE_ODEVICE_H_ | 21 | #define _LIBOPIE_ODEVICE_H_ |
22 | 22 | ||
23 | #include <qobject.h> | 23 | #include <qobject.h> |
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | #include <qnamespace.h> | 25 | #include <qnamespace.h> |
26 | #include <qstrlist.h> | ||
26 | 27 | ||
27 | #include <opie/odevicebutton.h> | 28 | #include <opie/odevicebutton.h> |
28 | 29 | ||
29 | #include <qpe/qpeapplication.h> /* for Transformation enum.. */ | 30 | #include <qpe/qpeapplication.h> /* for Transformation enum.. */ |
30 | 31 | ||
31 | class ODeviceData; | 32 | class ODeviceData; |
32 | 33 | ||
33 | namespace Opie { | 34 | namespace Opie { |
34 | 35 | ||
35 | /** | 36 | /** |
36 | * The available devices | 37 | * The available devices |
37 | */ | 38 | */ |
38 | enum OModel { | 39 | enum OModel { |
39 | Model_Unknown, // = 0 | 40 | Model_Unknown, // = 0 |
40 | 41 | ||
41 | Model_Series_Mask = 0xff000000, | 42 | Model_Series_Mask = 0xff000000, |
@@ -136,39 +137,38 @@ enum ODirection { | |||
136 | */ | 137 | */ |
137 | class ODevice : public QObject { | 138 | class ODevice : public QObject { |
138 | Q_OBJECT | 139 | Q_OBJECT |
139 | 140 | ||
140 | private: | 141 | private: |
141 | /* disable copy */ | 142 | /* disable copy */ |
142 | ODevice ( const ODevice & ); | 143 | ODevice ( const ODevice & ); |
143 | 144 | ||
144 | protected: | 145 | protected: |
145 | ODevice ( ); | 146 | ODevice ( ); |
146 | virtual void init ( ); | 147 | virtual void init ( ); |
147 | virtual void initButtons ( ); | 148 | virtual void initButtons ( ); |
148 | 149 | ||
149 | ODeviceData *d; | 150 | ODeviceData *d; |
150 | 151 | ||
151 | public: | 152 | public: |
152 | // sandman do we want to allow destructions? -zecke? | 153 | // sandman do we want to allow destructions? -zecke? |
153 | virtual ~ODevice ( ); | 154 | virtual ~ODevice ( ); |
154 | 155 | ||
155 | |||
156 | static ODevice *inst ( ); | 156 | static ODevice *inst ( ); |
157 | 157 | ||
158 | // information | 158 | // information |
159 | 159 | ||
160 | QString modelString ( ) const; | 160 | QString modelString ( ) const; |
161 | OModel model ( ) const; | 161 | OModel model ( ) const; |
162 | inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } | 162 | inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } |
163 | 163 | ||
164 | QString vendorString ( ) const; | 164 | QString vendorString ( ) const; |
165 | OVendor vendor ( ) const; | 165 | OVendor vendor ( ) const; |
166 | 166 | ||
167 | QString systemString ( ) const; | 167 | QString systemString ( ) const; |
168 | OSystem system ( ) const; | 168 | OSystem system ( ) const; |
169 | 169 | ||
170 | QString systemVersionString ( ) const; | 170 | QString systemVersionString ( ) const; |
171 | 171 | ||
172 | Transformation rotation ( ) const; | 172 | Transformation rotation ( ) const; |
173 | ODirection direction ( ) const; | 173 | ODirection direction ( ) const; |
174 | 174 | ||
@@ -185,32 +185,36 @@ public: | |||
185 | 185 | ||
186 | // input / output | 186 | // input / output |
187 | //FIXME playAlarmSound and al might be better -zecke | 187 | //FIXME playAlarmSound and al might be better -zecke |
188 | virtual void alarmSound ( ); | 188 | virtual void alarmSound ( ); |
189 | virtual void keySound ( ); | 189 | virtual void keySound ( ); |
190 | virtual void touchSound ( ); | 190 | virtual void touchSound ( ); |
191 | 191 | ||
192 | virtual QValueList <OLed> ledList ( ) const; | 192 | virtual QValueList <OLed> ledList ( ) const; |
193 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | 193 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; |
194 | virtual OLedState ledState ( OLed led ) const; | 194 | virtual OLedState ledState ( OLed led ) const; |
195 | virtual bool setLedState ( OLed led, OLedState st ); | 195 | virtual bool setLedState ( OLed led, OLedState st ); |
196 | 196 | ||
197 | virtual bool hasLightSensor ( ) const; | 197 | virtual bool hasLightSensor ( ) const; |
198 | virtual int readLightSensor ( ); | 198 | virtual int readLightSensor ( ); |
199 | virtual int lightSensorResolution ( ) const; | 199 | virtual int lightSensorResolution ( ) const; |
200 | 200 | ||
201 | QStrList &cpuFrequencies() const; | ||
202 | bool setCpuFrequency(uint index); | ||
203 | uint cpuFrequency() const; | ||
204 | |||
201 | /** | 205 | /** |
202 | * Returns the available buttons on this device. The number and location | 206 | * Returns the available buttons on this device. The number and location |
203 | * of buttons will vary depending on the device. Button numbers will be assigned | 207 | * of buttons will vary depending on the device. Button numbers will be assigned |
204 | * by the device manufacturer and will be from most preferred button to least preffered | 208 | * by the device manufacturer and will be from most preferred button to least preffered |
205 | * button. Note that this list only contains "user mappable" buttons. | 209 | * button. Note that this list only contains "user mappable" buttons. |
206 | */ | 210 | */ |
207 | const QValueList<ODeviceButton> &buttons ( ); | 211 | const QValueList<ODeviceButton> &buttons ( ); |
208 | 212 | ||
209 | /** | 213 | /** |
210 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it | 214 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it |
211 | * returns 0L | 215 | * returns 0L |
212 | */ | 216 | */ |
213 | const ODeviceButton *buttonForKeycode ( ushort keyCode ); | 217 | const ODeviceButton *buttonForKeycode ( ushort keyCode ); |
214 | 218 | ||
215 | /** | 219 | /** |
216 | * Reassigns the pressed action for \a button. To return to the factory | 220 | * Reassigns the pressed action for \a button. To return to the factory |