GNU Radio 3.4.2 C++ API
|
00001 /* -*- c++ -*- */ 00002 /* 00003 * Copyright 2004 Free Software Foundation, Inc. 00004 * 00005 * This file is part of GNU Radio 00006 * 00007 * GNU Radio is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 3, or (at your option) 00010 * any later version. 00011 * 00012 * GNU Radio is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with GNU Radio; see the file COPYING. If not, write to 00019 * the Free Software Foundation, Inc., 51 Franklin Street, 00020 * Boston, MA 02110-1301, USA. 00021 */ 00022 #ifndef INCLUDED_USRP_I2C_ADDR_H 00023 #define INCLUDED_USRP_I2C_ADDR_H 00024 00025 // I2C addresses 00026 00027 #define I2C_DEV_EEPROM 0x50 // 24LC02[45]: 7-bits 1010xxx 00028 00029 #define I2C_ADDR_BOOT (I2C_DEV_EEPROM | 0x0) 00030 #define I2C_ADDR_TX_A (I2C_DEV_EEPROM | 0x4) 00031 #define I2C_ADDR_RX_A (I2C_DEV_EEPROM | 0x5) 00032 #define I2C_ADDR_TX_B (I2C_DEV_EEPROM | 0x6) 00033 #define I2C_ADDR_RX_B (I2C_DEV_EEPROM | 0x7) 00034 00035 00036 // format of FX2 BOOT EEPROM 00037 // 00: 0xC0 code for ``Read IDs from EEPROM'' 00038 // 01: 0xFE USB Vendor ID (LSB) 00039 // 02: 0xFF USB Vendor ID (MSB) 00040 // 03: 0x02 USB Product ID (LSB) 00041 // 04: 0x00 USB Product ID (MSB) 00042 // 05: 0x01 USB Device ID (LSB) // rev1 00043 // 06: 0x00 USB Device ID (MSB) // 0 = unconfig'd (no firmware) 00044 // 07: 0x00 option byte 00045 00046 00047 // format of daughterboard EEPROM 00048 // 00: 0xDB code for ``I'm a daughterboard'' 00049 // 01: .. Daughterboard ID (LSB) 00050 // 02: .. Daughterboard ID (MSB) 00051 // 03: .. io bits 7-0 direction (bit set if it's an output from m'board) 00052 // 04: .. io bits 15-8 direction (bit set if it's an output from m'board) 00053 // 05: .. ADC0 DC offset correction (LSB) 00054 // 06: .. ADC0 DC offset correction (MSB) 00055 // 07: .. ADC1 DC offset correction (LSB) 00056 // 08: .. ADC1 DC offset correction (MSB) 00057 // ... 00058 // 1f: .. negative of the sum of bytes [0x00, 0x1e] 00059 00060 #define DB_EEPROM_MAGIC 0x00 00061 #define DB_EEPROM_MAGIC_VALUE 0xDB 00062 #define DB_EEPROM_ID_LSB 0x01 00063 #define DB_EEPROM_ID_MSB 0x02 00064 #define DB_EEPROM_OE_LSB 0x03 00065 #define DB_EEPROM_OE_MSB 0x04 00066 #define DB_EEPROM_OFFSET_0_LSB 0x05 // offset correction for ADC or DAC 0 00067 #define DB_EEPROM_OFFSET_0_MSB 0x06 00068 #define DB_EEPROM_OFFSET_1_LSB 0x07 // offset correction for ADC or DAC 1 00069 #define DB_EEPROM_OFFSET_1_MSB 0x08 00070 #define DB_EEPROM_CHKSUM 0x1f 00071 00072 #define DB_EEPROM_CLEN 0x20 // length of common portion of eeprom 00073 00074 #define DB_EEPROM_CUSTOM_BASE DB_EEPROM_CLEN // first avail offset for 00075 // daughterboard specific use 00076 00077 #endif /* INCLUDED_USRP_I2C_ADDR_H */ 00078