/* ***************************************************************************** ** Project : Analytice AnaGate ** File : AnaGate.h ** Author : Thomas Weber ** Copyright : (C) 2005 by Analytica GmbH ******************************************************************************** ** $Id: AnaGate.h,v 1.1.1.1 2010/07/16 18:12:17 ctarbert Exp $ ** ** $Log: AnaGate.h,v $ ** Revision 1.1.1.1 2010/07/16 18:12:17 ctarbert ** ** ** Revision 1.19 2007/10/25 12:41:28 axelschmidt ** Renesas block erase added ** ** Revision 1.18 2007/06/05 14:02:35 axelschmidt ** ANAGATE_DEVICE_MAX defined ** ** Revision 1.17 2007/05/22 13:50:16 axelschmidt ** Renesas commands ** ** Revision 1.16 2006/04/07 14:04:36 axelschmidt ** new command ** ** Revision 1.15 2006/04/07 13:52:58 axelschmidt ** Schreibfehler ** ** Revision 1.14 2006/03/06 14:45:54 axelschmidt ** new device AnaGate AD ** ** Revision 1.13 2005/12/27 08:27:13 AxelSchmidt ** base functions of SPI interface ** ** Revision 1.12 2005/11/30 10:14:08 axelschmidt ** new I2C command ** ** Revision 1.11 2005/11/28 17:07:03 axelschmidt ** device info structure changed ** ** Revision 1.10 2005/11/18 15:25:46 axelschmidt ** back to last version ** ** Revision 1.9 2005/11/17 14:48:08 axelschmidt ** . ** ** Revision 1.8 2005/09/16 09:18:50 axelschmidt ** Digital IO support for I2C and CAN ** ** Revision 1.7 2005/08/10 15:44:29 axelschmidt ** get_globals op code ** ** Revision 1.6 2005/08/04 09:52:35 axelschmidt ** new DIO op codes ** ** Revision 1.5 2005/08/02 13:46:50 axelschmidt ** MAC-Address 6 bytes ** ** Revision 1.4 2005/07/25 06:48:06 AxelSchmidt ** CAN spezifische OP-Codes ** ** Revision 1.3 2005/07/22 11:47:36 axelschmidt ** Command-Codes auf TCP-Protokoll 2.0 verändert ** ** Revision 1.2 2005/07/22 07:16:20 AxelSchmidt ** structure defined ** ** Revision 1.1 2005/07/11 16:17:52 axelschmidt ** initial ** *******************************************************************************/ #ifndef AnaGate_h #define AnaGate_h /** Start der PORT Adressen der AnaGate Serie */ #define ANAGATE_PORT 4999 /** Nummer des höchsten AnaGate-Port (Anzahl = Nummer + 1) */ #define DEVICE_PORT_MAX 3 /** AnaGate devices */ enum EAnaGateDevice { DEVICE_ANAGATE_I2C = 1, ///< AnaGate I2C DEVICE_ANAGATE_CAN = 2, ///< AnaGate CAN DEVICE_ANAGATE_SPI = 3, ///< AnaGate SPI DEVICE_ANAGATE_RS232 = 4, ///< AnaGate RS232 DEVICE_ANAGATE_DIGIO = 5, ///< AnaGate DIGIO DEVICE_ANAGATE_AUDIO = 6, ///< AnaGate AUDIO DEVICE_ANAGATE_AD = 7, ///< AnaGate A/D DEVICE_ANAGATE_PHONE = 8, ///< AnaGate PHONE DEVICE_ANAGATE_RENESAS = 9, ///< AnaGate Renesas DEVICE_ANAGATE_MAX = 9 }; /** AnaGate commands */ enum EAnaGateCommand { // standard command CMD_ANAGATE_OPEN = 1, ///< open command. CMD_ANAGATE_CLOSE = 2, ///< close command CMD_ANAGATE_DATA = 3, ///< data command CMD_ANAGATE_RESET = 4, ///< reset command CMD_ANAGATE_SET_CONFIG = 5, ///< config command. CMD_ANAGATE_GET_CONFIG = 6, ///< read config command CMD_ANAGATE_SET_GLOBALS = 7, ///< global config command. CMD_ANAGATE_GET_GLOBALS = 8, ///< read global config command CMD_ANAGATE_GET_INFO = 9, ///< info/version CMD_ANAGATE_GET_STATUS = 10, ///< status information // special commands for I2C CMD_ANAGATE_I2C_READ = 0x10, ///< I2C read command. CMD_ANAGATE_I2C_WRITE = 0x11, ///< I2C write command CMD_ANAGATE_I2C_READ_EEPROM = 0x12, ///< I2C EEPROM read command. CMD_ANAGATE_I2C_WRITE_EEPROM = 0x13, ///< I2C EEPROM write command CMD_ANAGATE_I2C_SEQUENCE = 0x14, ///< I2C sequence command // special commands for CAN CMD_ANAGATE_CAN_SET_FILTER = 0x20, ///< Set Filter CMD_ANAGATE_CAN_GET_FILTER = 0x21, ///< Get Filter CMD_ANAGATE_ZCARD_PI_DATA = 0x50, ///< Z-Card Process Image Date CMD_ANAGATE_SET_ZCARD_PI = 0x51, ///< Set Z-Card Process Image Parameters CMD_ANAGATE_GET_ZCARD_PI = 0x52, ///< Get Z-Card Process Image Parameters // special commands for Renesas CMD_ANAGATE_RENESAS_INIT = 0x20, ///< Perform Init Procedure for starting programming CMD_ANAGATE_RENESAS_CHECK_ID = 0x21, ///< Check ID to unlock µC CMD_ANAGATE_RENESAS_SET_BAUD = 0x22, ///< Change Baudrate CMD_ANAGATE_RENESAS_PAGE_READ = 0x23, ///< Read a page of µC CMD_ANAGATE_RENESAS_ERASE_ALL = 0x24, ///< Perform a Erase all Block command CMD_ANAGATE_RENESAS_PAGE_PROG = 0x25, ///< Programs a page to the µC CMD_ANAGATE_RENESAS_GET_VERS = 0x26, ///< Returns the Version of the µC Boot load CMD_ANAGATE_RENESAS_COMPLETE = 0x27, ///< Peforms the completion command CMD_ANAGATE_RENESAS_VERIFYCHK = 0x28, ///< Peforms the verify check command CMD_ANAGATE_RENESAS_BLOCK_ERASE = 0x29, ///< Peforms the block erase command // special commands for AD CMD_ANAGATE_AD_READ = 0x30, ///< analogue read command. // special commands for DIGIO/I2C/CAN/SPI/RS232 CMD_ANAGATE_DIO_READ = 0x40, ///< DIO read command. CMD_ANAGATE_DIO_WRITE = 0x41 ///< DIO write command }; #define ANAGATE_CMDCODE( cnf_rsp, device, cmd ) \ ( (((short)(cmd))&0xff) | ((((short)(device))&0x7f)<<8) | (((cnf_rsp)&0x01)<<15) ) #define CNF_RSP 1 #define REQ_IND 0 /** OP-Codes für die TCP/IP-Nachrichten zwischen PC und AnaGate */ enum EAnaGateMsgTyp { OP_I2C_OPEN_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_I2C, CMD_ANAGATE_OPEN ), OP_I2C_OPEN_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_I2C, CMD_ANAGATE_OPEN ), OP_I2C_CLOSE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_I2C, CMD_ANAGATE_CLOSE ), OP_I2C_CLOSE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_I2C, CMD_ANAGATE_CLOSE ), OP_I2C_RESET_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_I2C, CMD_ANAGATE_RESET ), OP_I2C_RESET_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_I2C, CMD_ANAGATE_RESET ), OP_I2C_SET_GLOBALS_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_I2C, CMD_ANAGATE_SET_GLOBALS ), OP_I2C_SET_GLOBALS_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_I2C, CMD_ANAGATE_SET_GLOBALS ), OP_I2C_GET_GLOBALS_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_I2C, CMD_ANAGATE_GET_GLOBALS ), OP_I2C_GET_GLOBALS_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_I2C, CMD_ANAGATE_GET_GLOBALS ), OP_I2C_GET_STATUS_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_I2C, CMD_ANAGATE_GET_STATUS ), OP_I2C_GET_STATUS_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_I2C, CMD_ANAGATE_GET_STATUS ), OP_I2C_GET_INFO_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_I2C, CMD_ANAGATE_GET_INFO ), OP_I2C_GET_INFO_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_I2C, CMD_ANAGATE_GET_INFO ), OP_I2C_READ_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_I2C, CMD_ANAGATE_I2C_READ ), OP_I2C_READ_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_I2C, CMD_ANAGATE_I2C_READ ), OP_I2C_WRITE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_I2C, CMD_ANAGATE_I2C_WRITE ), OP_I2C_WRITE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_I2C, CMD_ANAGATE_I2C_WRITE ), OP_I2C_READ_EEPROM_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_I2C, CMD_ANAGATE_I2C_READ_EEPROM ), OP_I2C_READ_EEPROM_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_I2C, CMD_ANAGATE_I2C_READ_EEPROM ), OP_I2C_WRITE_EEPROM_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_I2C, CMD_ANAGATE_I2C_WRITE_EEPROM ), OP_I2C_WRITE_EEPROM_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_I2C, CMD_ANAGATE_I2C_WRITE_EEPROM ), OP_I2C_SEQUENCE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_I2C, CMD_ANAGATE_I2C_SEQUENCE ), OP_I2C_SEQUENCE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_I2C, CMD_ANAGATE_I2C_SEQUENCE ), OP_I2C_DIO_READ_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_I2C, CMD_ANAGATE_DIO_READ ), OP_I2C_DIO_READ_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_I2C, CMD_ANAGATE_DIO_READ ), OP_I2C_DIO_WRITE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_I2C, CMD_ANAGATE_DIO_WRITE ), OP_I2C_DIO_WRITE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_I2C, CMD_ANAGATE_DIO_WRITE ), OP_CAN_OPEN_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_OPEN ), OP_CAN_OPEN_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_OPEN ), OP_CAN_CLOSE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_CLOSE ), OP_CAN_CLOSE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_CLOSE ), OP_CAN_DATA_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_DATA ), OP_CAN_DATA_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_DATA ), OP_CAN_DATA_IND = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_DATA ), OP_CAN_DATA_RSP = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_DATA ), OP_CAN_SET_CONFIG_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_SET_CONFIG ), OP_CAN_SET_CONFIG_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_SET_CONFIG ), OP_CAN_GET_CONFIG_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_GET_CONFIG ), OP_CAN_GET_CONFIG_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_GET_CONFIG ), OP_CAN_SET_GLOBALS_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_SET_GLOBALS ), OP_CAN_SET_GLOBALS_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_SET_GLOBALS ), OP_CAN_GET_GLOBALS_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_GET_GLOBALS ), OP_CAN_GET_GLOBALS_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_GET_GLOBALS ), OP_CAN_GET_INFO_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_GET_INFO ), OP_CAN_GET_INFO_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_GET_INFO ), OP_CAN_GET_STATUS_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_GET_STATUS ), OP_CAN_GET_STATUS_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_GET_STATUS ), OP_CAN_DIO_READ_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_DIO_READ ), OP_CAN_DIO_READ_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_DIO_READ ), OP_CAN_DIO_WRITE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_DIO_WRITE ), OP_CAN_DIO_WRITE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_DIO_WRITE ), OP_CAN_SET_FILTER_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_CAN_SET_FILTER ), OP_CAN_SET_FILTER_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_CAN_SET_FILTER ), OP_CAN_GET_FILTER_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_CAN_GET_FILTER ), OP_CAN_GET_FILTER_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_CAN_GET_FILTER ), OP_CAN_ZCARD_PI_DATA_IND = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_ZCARD_PI_DATA ), OP_CAN_SET_ZCARD_PI_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_SET_ZCARD_PI ), OP_CAN_SET_ZCARD_PI_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_SET_ZCARD_PI ), OP_CAN_GET_ZCARD_PI_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_CAN, CMD_ANAGATE_GET_ZCARD_PI ), OP_CAN_GET_ZCARD_PI_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_CAN, CMD_ANAGATE_GET_ZCARD_PI ), OP_DIGIO_OPEN_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_DIGIO, CMD_ANAGATE_OPEN ), OP_DIGIO_OPEN_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_DIGIO, CMD_ANAGATE_OPEN ), OP_DIGIO_CLOSE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_DIGIO, CMD_ANAGATE_CLOSE ), OP_DIGIO_CLOSE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_DIGIO, CMD_ANAGATE_CLOSE ), OP_DIGIO_READ_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_DIGIO, CMD_ANAGATE_DIO_READ ), OP_DIGIO_READ_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_DIGIO, CMD_ANAGATE_DIO_READ ), OP_DIGIO_WRITE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_DIGIO, CMD_ANAGATE_DIO_WRITE ), OP_DIGIO_WRITE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_DIGIO, CMD_ANAGATE_DIO_WRITE ), OP_AD_OPEN_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_AD, CMD_ANAGATE_OPEN ), OP_AD_OPEN_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_AD, CMD_ANAGATE_OPEN ), OP_AD_CLOSE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_AD, CMD_ANAGATE_CLOSE ), OP_AD_CLOSE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_AD, CMD_ANAGATE_CLOSE ), OP_AD_READ_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_AD, CMD_ANAGATE_AD_READ ), OP_AD_READ_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_AD, CMD_ANAGATE_AD_READ ), OP_AD_DIO_READ_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_AD, CMD_ANAGATE_DIO_READ ), OP_AD_DIO_READ_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_AD, CMD_ANAGATE_DIO_READ ), OP_AD_DIO_WRITE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_AD, CMD_ANAGATE_DIO_WRITE ), OP_AD_DIO_WRITE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_AD, CMD_ANAGATE_DIO_WRITE ), OP_RS232_OPEN_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RS232, CMD_ANAGATE_OPEN ), OP_RS232_OPEN_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RS232, CMD_ANAGATE_OPEN ), OP_RS232_DATA_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RS232, CMD_ANAGATE_DATA ), OP_RS232_DATA_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RS232, CMD_ANAGATE_DATA ), OP_RS232_DATA_IND = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RS232, CMD_ANAGATE_DATA ), OP_RS232_DATA_RSP = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RS232, CMD_ANAGATE_DATA ), OP_RS232_CLOSE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RS232, CMD_ANAGATE_CLOSE ), OP_RS232_CLOSE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RS232, CMD_ANAGATE_CLOSE ), OP_RS232_GET_INFO_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RS232, CMD_ANAGATE_GET_INFO ), OP_RS232_GET_INFO_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RS232, CMD_ANAGATE_GET_INFO ), OP_RS232_GET_STATUS_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RS232, CMD_ANAGATE_GET_STATUS ), OP_RS232_GET_STATUS_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RS232, CMD_ANAGATE_GET_STATUS ), OP_RS232_DIO_READ_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RS232, CMD_ANAGATE_DIO_READ ), OP_RS232_DIO_READ_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RS232, CMD_ANAGATE_DIO_READ ), OP_RS232_DIO_WRITE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RS232, CMD_ANAGATE_DIO_WRITE ), OP_RS232_DIO_WRITE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RS232, CMD_ANAGATE_DIO_WRITE ), OP_SPI_OPEN_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_SPI, CMD_ANAGATE_OPEN ), OP_SPI_OPEN_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_SPI, CMD_ANAGATE_OPEN ), OP_SPI_CLOSE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_SPI, CMD_ANAGATE_CLOSE ), OP_SPI_CLOSE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_SPI, CMD_ANAGATE_CLOSE ), OP_SPI_RESET_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_SPI, CMD_ANAGATE_RESET ), OP_SPI_RESET_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_SPI, CMD_ANAGATE_RESET ), OP_SPI_SET_GLOBALS_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_SPI, CMD_ANAGATE_SET_GLOBALS ), OP_SPI_SET_GLOBALS_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_SPI, CMD_ANAGATE_SET_GLOBALS ), OP_SPI_GET_GLOBALS_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_SPI, CMD_ANAGATE_GET_GLOBALS ), OP_SPI_GET_GLOBALS_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_SPI, CMD_ANAGATE_GET_GLOBALS ), OP_SPI_GET_STATUS_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_SPI, CMD_ANAGATE_GET_STATUS ), OP_SPI_GET_STATUS_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_SPI, CMD_ANAGATE_GET_STATUS ), OP_SPI_GET_INFO_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_SPI, CMD_ANAGATE_GET_INFO ), OP_SPI_GET_INFO_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_SPI, CMD_ANAGATE_GET_INFO ), OP_SPI_DATA_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_SPI, CMD_ANAGATE_DATA ), OP_SPI_DATA_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_SPI, CMD_ANAGATE_DATA ), OP_SPI_DIO_READ_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_SPI, CMD_ANAGATE_DIO_READ ), OP_SPI_DIO_READ_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_SPI, CMD_ANAGATE_DIO_READ ), OP_SPI_DIO_WRITE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_SPI, CMD_ANAGATE_DIO_WRITE ), OP_SPI_DIO_WRITE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_SPI, CMD_ANAGATE_DIO_WRITE ), OP_SPI_SEQUENCE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_SPI, CMD_ANAGATE_I2C_SEQUENCE ), OP_SPI_SEQUENCE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_SPI, CMD_ANAGATE_I2C_SEQUENCE ), OP_RENESAS_OPEN_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_OPEN ), OP_RENESAS_OPEN_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_OPEN ), OP_RENESAS_CLOSE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_CLOSE ), OP_RENESAS_CLOSE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_CLOSE ), OP_RENESAS_GET_INFO_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_GET_INFO ), OP_RENESAS_GET_INFO_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_GET_INFO ), OP_RENESAS_DIO_READ_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_DIO_READ ), OP_RENESAS_DIO_READ_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_DIO_READ ), OP_RENESAS_DIO_WRITE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_DIO_WRITE ), OP_RENESAS_DIO_WRITE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_DIO_WRITE ), OP_RENESAS_INIT_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_INIT ), OP_RENESAS_INIT_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_INIT ), OP_RENESAS_CHECK_ID_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_CHECK_ID ), OP_RENESAS_CHECK_ID_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_CHECK_ID ), OP_RENESAS_SET_BAUD_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_SET_BAUD ), OP_RENESAS_SET_BAUD_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_SET_BAUD ), OP_RENESAS_PAGE_READ_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_PAGE_READ ), OP_RENESAS_PAGE_READ_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_PAGE_READ ), OP_RENESAS_ERASE_ALL_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_ERASE_ALL ), OP_RENESAS_ERASE_ALL_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_ERASE_ALL ), OP_RENESAS_BLOCK_ERASE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_BLOCK_ERASE ), OP_RENESAS_BLOCK_ERASE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_BLOCK_ERASE ), OP_RENESAS_PAGE_PROG_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_PAGE_PROG ), OP_RENESAS_PAGE_PROG_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_PAGE_PROG ), OP_RENESAS_GET_VERS_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_GET_VERS ), OP_RENESAS_GET_VERS_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_GET_VERS ), OP_RENESAS_COMPLETE_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_COMPLETE ), OP_RENESAS_COMPLETE_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_COMPLETE ), OP_RENESAS_VERIFY_CHK_REQ = ANAGATE_CMDCODE( REQ_IND, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_VERIFYCHK ), OP_RENESAS_VERIFY_CHK_CNF = ANAGATE_CMDCODE( CNF_RSP, DEVICE_ANAGATE_RENESAS, CMD_ANAGATE_RENESAS_VERIFYCHK ) }; #ifndef __ZILOG__ #pragma pack(1) #endif // __ZILOG__ struct SAnaGateDeviceInfo { long m_nSWVersion; ///< Software version (firmware) long m_nHWVersion; ///< Hardware version char m_sSerial[4]; ///< Serial number of AnaGate device char m_sMACAddr[6]; ///< MAC-Address of AnaGate device char m_nDeviceID; ///< device id of AnaGate device (AnaGate platform) char m_nSWDerivateID; ///< Software derivate id (0 = classic software) }; #ifndef __ZILOG__ #pragma pack() #endif // __ZILOG__ #endif // #ifndef AnaGate_h