X-Git-Url: https://git.karo-electronics.de/?p=metawatch.git;a=blobdiff_plain;f=metawatch_protocol.h;h=0212438b4614d52e812c447bc70b89d20a2fd95f;hp=0f45ac0863e096f5d064233314f6eb4344661924;hb=HEAD;hpb=114128414399b173f8c6e2070abe31fa35e71f29 diff --git a/metawatch_protocol.h b/metawatch_protocol.h index 0f45ac0..0212438 100644 --- a/metawatch_protocol.h +++ b/metawatch_protocol.h @@ -22,12 +22,26 @@ #define MW_SOF 0x01 +/* general */ #define MW_GET_DEVICE_TYPE 0x01 #define MW_GET_DEVICE_TYPE_RSP 0x02 + +#define MW_DEVICE_TYPE_RESERVED 0x00 +#define MW_DEVICE_TYPE_ANA_DIGI 0x01 +#define MW_DEVICE_TYPE_DIGITAL 0x02 +#define MW_DEVICE_TYPE_DEVB_DIGI 0x03 +#define MW_DEVICE_TYPE_DEVB_ANA_DIGI 0x04 + #define MW_GET_INFORMATION_STRING 0x03 #define MW_GET_INFORMATION_STRING_RSP 0x04 +/* specific for ana-digi version */ +#define MW_UPDATE_OLED_DISPLAY_MSG 0x10 +#define MW_WRITE_OLED_IDLE_DISPLAY_MSG 0x11 +#define MW_WRITE_OLED_SCROLL_BUFFER_MSG 0x15 +#define MW_ENABLE_OLED_DISPLAY_MSG 0x16 #define MW_ADVANCE_WATCH_HANDS 0x20 + #define MW_SET_VIBRATE_MODE 0x23 #define MW_SET_REAL_TIME_CLOCK 0x26 @@ -39,10 +53,24 @@ #define MW_RTC_DATE_MMDD 0x00 #define MW_RTC_DATE_DDMM 0x01 +#define MW_LANG_EN 0x00 +#define MW_LANG_FI 0x01 +#define MW_LANG_DE 0x02 + +#define MW_NVAL_OPERATION 0x30 +#define MW_NVAL_OPERATION_RSP 0x31 + +#define MW_NVAL_OPERATION_READ 0x01 +#define MW_NVAL_OPERATION_WRITE 0x02 +#define MW_NVAL_TIME_FORMAT 0x2009 +#define MW_NVAL_DATE_FORMAT 0x200a +#define MW_NVAL_LANGUAGE 0x200c + #define MW_RESERVED 0x32 #define MW_STATUS_CHANGE_EVENT 0x33 #define MW_BUTTON_EVENT_MESSAGE 0x34 +/* specific for digital version */ #define MW_WRITE_BUFFER 0x40 #define MW_CONFIGURE_MODE 0x41 #define MW_CONFIGURE_IDLE_BUFFER_SIZE 0x42 @@ -51,6 +79,7 @@ #define MW_RESERVED2 0x45 #define MW_ENABLE_BUTTON 0x46 #define MW_DISABLE_BUTTON 0x47 +/* READ_BUTTON_* have been removed from the spec */ #define MW_READ_BUTTON_CONFIG 0x48 #define MW_READ_BUTTON_CONFIG_RSP 0x49 #define MW_RESERVED3 0x4a @@ -65,11 +94,33 @@ #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 + +/* button events */ +#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 + +/* OLEDs */ + +#define MW_OLED_UPPER 0x00 +#define MW_OLED_LOWER 0x01 + #endif