ee_access.h 736 B

123456789101112131415161718192021222324252627282930
  1. /* By Thomas.Lange@Corelatus.com 001025 */
  2. /* Definitions for EEPROM/VOLT METER DS2438 */
  3. /* Copyright (C) 2000-2005 Corelatus AB */
  4. #ifndef INCeeaccessh
  5. #define INCeeaccessh
  6. #include <asm/types.h>
  7. #include "ee_dev.h"
  8. int ee_do_cpu_command( u8 *Tx, int Tx_len, u8 *Rx, int Rx_len, int Send_skip );
  9. int ee_init_cpu_data(void);
  10. int ee_crc_ok( u8 *Buffer, int Len, u8 Crc );
  11. /* Defs for altera reg */
  12. #define EE_WRITE_SHIFT 8 /* bits to shift left */
  13. #define EE_READ_SHIFT 16 /* bits to shift left */
  14. #define EE_DONE 0x80000000
  15. #define EE_BUSY 0x40000000
  16. #define EE_ERROR 0x20000000
  17. /* Commands */
  18. #define EE_CMD_NOP 0
  19. #define EE_CMD_INIT_RES 1
  20. #define EE_CMD_WR_BYTE 2
  21. #define EE_CMD_RD_BYTE 3
  22. #endif /* INCeeaccessh */