]> git.zerfleddert.de Git - hmcfgusb/blobdiff - hmuartlgw.h
firmware: fix maximum size
[hmcfgusb] / hmuartlgw.h
index 8281bef64e5120ff8cd382c85fd64b23786055df..388d01e932bf9753fbeb0368db772c3324b67f32 100644 (file)
@@ -1,6 +1,6 @@
 /* HM-MOD-UART/HM-LGW-O-TW-W-EU driver
  *
- * Copyright (c) 2016 Michael Gernoth <michael@gernoth.net>
+ * Copyright (c) 2016-17 Michael Gernoth <michael@gernoth.net>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -25,6 +25,7 @@
 #define HMUARTLGW_OS_GET_FIRMWARE      0x02
 #define HMUARTLGW_OS_CHANGE_APP                0x03
 #define HMUARTLGW_OS_ACK               0x04
+#define HMUARTLGW_OS_UPDATE_FIRMWARE   0x05
 #define HMUARTLGW_OS_UNSOL_CREDITS     0x05
 #define HMUARTLGW_OS_NORMAL_MODE       0x06
 #define HMUARTLGW_OS_UPDATE_MODE       0x07
 #define HMUARTLGW_APP_RECV             0x05
 #define HMUARTLGW_APP_ADD_PEER         0x06
 #define HMUARTLGW_APP_REMOVE_PEER      0x07
+#define HMUARTLGW_APP_GET_PEERS                0x08
 #define HMUARTLGW_APP_PEER_ADD_AES     0x09
 #define HMUARTLGW_APP_PEER_REMOVE_AES  0x0A
 #define HMUARTLGW_APP_SET_OLD_KEY      0x0F    /* key index */
 #define HMUARTLGW_APP_DEFAULT_HMID     0x10
 
+#define HMUARTLGW_DUAL_GET_APP         0x01
+#define HMUARTLGW_DUAL_CHANGE_APP      0x02
+
+#define HMUARTLGW_ACK_EINPROGRESS      0x08
+
 enum hmuartlgw_dst {
        HMUARTLGW_OS = 0,
        HMUARTLGW_APP = 1,
+       HMUARTLGW_DUAL = 0xfe,
+       HMUARTLGW_DUAL_ERR = 0xff,
 };
 
 typedef int (*hmuartlgw_cb_fn)(enum hmuartlgw_dst dst, uint8_t *buf, int buf_len, void *data);
@@ -62,7 +71,7 @@ struct hmuartlgw_dev {
        int unescape_next;
 };
 
-struct hmuartlgw_dev *hmuart_init(char *device, hmuartlgw_cb_fn cb, void *data);
+struct hmuartlgw_dev *hmuart_init(char *device, hmuartlgw_cb_fn cb, void *data, int app);
 struct hmuartlgw_dev *hmlgw_init(char *device, hmuartlgw_cb_fn cb, void *data);
 int hmuartlgw_send_raw(struct hmuartlgw_dev *dev, uint8_t *frame, int framelen);
 int hmuartlgw_send(struct hmuartlgw_dev *dev, uint8_t *cmd, int cmdlen, enum hmuartlgw_dst dst);
Impressum, Datenschutz