X-Git-Url: https://git.kernelconcepts.de/?p=metawatch.git;a=blobdiff_plain;f=metawatch_protocol.h;h=2aa9fe8916f416168ff49d1d11953ce2572b154e;hp=f0ad616f0684fe9eab7c708e4c9dc3df4596fdcd;hb=6e7a56e3e82a6c28f2267c63159a86f484c1b122;hpb=c8307dc90a7315f574760f6de5b588a419f1511a diff --git a/metawatch_protocol.h b/metawatch_protocol.h index f0ad616..2aa9fe8 100644 --- a/metawatch_protocol.h +++ b/metawatch_protocol.h @@ -1,3 +1,22 @@ +/* + * (c) 2011 Siegen, Germany by Nils Faerber + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #ifndef _MW_PROT_H #define _MW_PROT_H @@ -41,14 +60,33 @@ #define MW_LOW_BATTERY_BT_OFF_MSG 0x55 #define MW_READ_BATTERY_VOLTAGE_MSG 0x56 #define MW_READ_BATTERY_VOLTAGE_RSP 0x57 - +#define MW_READ_LIGHT_SENSOR_MSG 0x58 +#define MW_READ_LIGHT_SENSOR_RSP 0x59 #define MW_ACCELEROMETER 0xea +/* screen modes */ #define MW_SCREEN_MODE_IDLE 0x00 #define MW_SCREEN_MODE_APPLICATION 0x01 #define MW_SCREEN_MODE_NOTIFICATION 0x02 #define MW_SCREEN_MODE_SCROLL 0x03 + +/* button definitions */ +#define MW_BUTTON_A 0x00 +#define MW_BUTTON_B 0x01 +#define MW_BUTTON_C 0x02 +#define MW_BUTTON_D 0x03 +#define MW_BUTTON_RES4 0x04 +#define MW_BUTTON_E 0x05 +#define MW_BUTTON_F 0x06 +#define MW_BUTTON_PULLSW 0x07 + +#define MW_BUTTON_IMMEDIATE 0x00 +#define MW_BUTTON_PRESS_AND_RELEASE 0x01 +#define MW_BUTTON_HOLD_RELEASE 0x02 +#define MW_BUTTON_LONG_HOLD_RELEASE 0x03 + + #endif