diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-11-19 22:39:29 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-11-19 22:39:29 +0000 |
commit | 39fb6f44d7f137a6a9625b1afed557f69e438b9a (patch) | |
tree | a3669271a8e2d4c76162e29a784deda5aa2e6b38 /xpp/mpp.h | |
parent | 50835291aad9c71510af2efdd785ed6ab1da37a3 (diff) |
xpp: MPP protocol v.1.4
* New firmware loading protocol
- Older one (1.3) is still supported for now
* Support loading firmwares from Astribanks with a minimal firmware
(1163)
* astribank_tool -Q: always query, regardless of verbosity level
xpp rev: up to 7559
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@7609 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp/mpp.h')
-rw-r--r-- | xpp/mpp.h | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -34,7 +34,8 @@ #define MK_PROTO_VERSION(major, minor) (((major) << 4) | (0x0F & (minor))) -#define MPP_PROTOCOL_VERSION MK_PROTO_VERSION(1,3) +#define MPP_PROTOCOL_VERSION MK_PROTO_VERSION(1,4) +#define MPP_SUPPORTED_VERSION(x) ((x) == MK_PROTO_VERSION(1,3) || (x) == MK_PROTO_VERSION(1,4)) /* * The eeprom_table is common to all eeprom types. @@ -49,6 +50,13 @@ struct eeprom_table { uint8_t label[LABEL_SIZE]; } PACKED; +#define VERSION_LEN 6 +struct firmware_versions { + char usb[VERSION_LEN]; + char fpga[VERSION_LEN]; + char eeprom[VERSION_LEN]; +} PACKED; + struct capabilities { uint8_t ports_fxs; uint8_t ports_fxo; @@ -94,6 +102,7 @@ enum mpp_command_ops { MPP_STATUS_GET = 0x11, /* Get Astribank Status */ MPP_STATUS_GET_REPLY = 0x91, + MPP_STATUS_GET_REPLY_V13 = 0x91, /* backward compat */ MPP_EXTRAINFO_GET = 0x13, /* Get extra vendor information */ MPP_EXTRAINFO_GET_REPLY = 0x93, @@ -150,11 +159,20 @@ CMD_DEF(PROTO_REPLY, CMD_DEF(STATUS_GET); +CMD_DEF(STATUS_GET_REPLY_V13, + uint8_t i2cs_data; + +#define STATUS_FPGA_LOADED(x) ((x) & 0x01) + uint8_t status; /* BIT(0) - FPGA is loaded */ + ); + + CMD_DEF(STATUS_GET_REPLY, uint8_t i2cs_data; #define STATUS_FPGA_LOADED(x) ((x) & 0x01) uint8_t status; /* BIT(0) - FPGA is loaded */ + struct firmware_versions fw_versions; ); CMD_DEF(EEPROM_SET, @@ -199,6 +217,7 @@ CMD_DEF(EEPROM_BLK_RD_REPLY, CMD_DEF(DEV_SEND_START, uint8_t dest; + char ihex_version[VERSION_LEN]; ); CMD_DEF(DEV_SEND_END); @@ -253,6 +272,7 @@ struct mpp_command { MEMBER(PROTO_QUERY); MEMBER(PROTO_REPLY); MEMBER(STATUS_GET); + MEMBER(STATUS_GET_REPLY_V13); MEMBER(STATUS_GET_REPLY); MEMBER(EEPROM_SET); MEMBER(CAPS_GET); |