25 | | // This function checks to see if a valid calibration value is stored on the EEPROM[[BR]] |
26 | | // and returns the value if so.[[BR]] |
27 | | // baseaddr is the base address of the EEPROM device[[BR]] |
28 | | // RxNTx specifies whether the values are the Rx or Tx values. 1 indicates Rx[[BR]] |
29 | | // val_select selects which value to write[[BR]] |
30 | | // 0: DC offset 1: Gain IQ 2: Phase IQ[[BR]] |
31 | | // Returns a short where the most significant byte is the Q-value and [[BR]] |
32 | | // the least significant byte is the I-value.[[BR]] |
| 33 | - This function checks to see if a valid calibration value is stored on the EEPROM[[BR]] |
| 34 | and returns the value if so.[[BR]] |
| 35 | - ''baseaddr'' is the base address of the EEPROM peripheral[[BR]] |
| 36 | - ''RxNTx'' specifies whether the values are the Rx or Tx values. 1 indicates Rx[[BR]] |
| 37 | - ''val_select'' selects which value to write[[BR]] |
| 38 | 0: DC offset 1: Gain IQ 2: Phase IQ[[BR]] |
| 39 | - Returns a short where the most significant byte is the Q-value and [[BR]] |
| 40 | the least significant byte is the I-value.[[BR]] |
34 | | '''''char WarpEEPROM_WriteRadioCal(unsigned int* baseaddr, char RxNTx, char val_select, char I_val, char Q_val);'''''[[BR]] |
35 | | // This functions writes a calibration value to the EEPROM[[BR]] |
36 | | // baseaddr is the base address of the EEPROM device[[BR]] |
37 | | // RxNTx specifies whether the values are the Rx or Tx values. 1 indicates Rx[[[BR]] |
38 | | // val_select selects which value to write[[BR]] |
39 | | // 0: DC offset 1: Gain IQ 2: Phase IQ[[BR]] |
40 | | // I_val is the I-component to be stored[[BR]] |
41 | | // Q_val is the Q-component to be stored[[BR]] |
42 | | // Returns SUCCESS if all goes well, FAILURE otherwise[[BR]] |
| 42 | '''''char WarpEEPROM_WriteRadioCal(unsigned int* baseaddr, char RxNTx, char val_select, char I_val, char Q_val)'''''[[BR]] |
| 43 | - This function writes a calibration value to the EEPROM[[BR]] |
| 44 | - ''baseaddr'' is the base address of the EEPROM peripheral[[BR]] |
| 45 | - ''RxNTx'' specifies whether the values are the Rx or Tx values. 1 indicates Rx[[BR]] |
| 46 | - ''val_select'' selects which value to write[[BR]] |
| 47 | 0: DC offset 1: Gain IQ 2: Phase IQ[[BR]] |
| 48 | - ''I_val'' is the I-component to be stored[[BR]] |
| 49 | - ''Q_val'' is the Q-component to be stored[[BR]] |
| 50 | - Returns SUCCESS (0x00) if all goes well, FAILURE (0xff) otherwise[[BR]] |
44 | | '''''void WarpEEPROM_ReadMACAddress(unsigned int* baseaddr, char dev_select, char *MAC);'''''[[BR]] |
45 | | // This function writes a 6-byte MAC address into a 6-byte array addressed by a pointer.[[BR]] |
46 | | // baseaddr is the base address of the EEPROM device[[BR]] |
47 | | // dev_select specifies which device's MAC address to read[[BR]] |
48 | | // 0: FPGA Board 1: Radio1 2: Radio2 3: Radio3 4: Radio4[[BR]] |
49 | | // *MAC is a pointer to a 6-byte array[[BR]] |
| 52 | '''''void WarpEEPROM_ReadMACAddress(unsigned int* baseaddr, char dev_select, char *MAC)'''''[[BR]] |
| 53 | - This function writes a 6-byte MAC address into a 6-byte array addressed by a pointer.[[BR]] |
| 54 | - ''baseaddr'' is the base address of the EEPROM peripheral[[BR]] |
| 55 | - ''dev_select'' specifies which device's MAC address to read[[BR]] |
| 56 | 0: FPGA Board 1: Radio1 2: Radio2 3: Radio3 4: Radio4[[BR]] |
| 57 | - ''*MAC'' is a pointer to a 6-byte array[[BR]] |
51 | | '''''char WarpEEPROM_WriteMACAddress(unsigned int* baseaddr, char dev_select, char *MAC);'''''[[BR]] |
52 | | // This function writes a 6-byte MAC address into the EEPROM.[[BR]] |
53 | | // baseaddr is the base address of the EEPROM device[[BR]] |
54 | | // dev_select specifies which device's MAC address to read[[BR]] |
55 | | // 0: FPGA Board 1: Radio1 2: Radio2 3: Radio3 4: Radio4[[BR]] |
56 | | // *MAC is a pointer to a 6-byte array containing the address[[BR]] |
57 | | // Returns SUCCESS if all goes well, FAILURE otherwise[[BR]] |
| 59 | '''''char WarpEEPROM_WriteMACAddress(unsigned int* baseaddr, char dev_select, char *MAC)'''''[[BR]] |
| 60 | - This function writes a 6-byte MAC address into the EEPROM.[[BR]] |
| 61 | - ''baseaddr'' is the base address of the EEPROM peripheral[[BR]] |
| 62 | - ''dev_select'' specifies which device's MAC address to read[[BR]] |
| 63 | 0: FPGA Board 1: Radio1 2: Radio2 3: Radio3 4: Radio4[[BR]] |
| 64 | - ''*MAC'' is a pointer to a 6-byte array containing the address[[BR]] |
| 65 | - Returns SUCCESS if all goes well, FAILURE otherwise[[BR]] |
62 | | '''''void WarpEEPROM_ReadDSSerial(unsigned int* baseaddr, unsigned char *Serial);'''''[[BR]] |
63 | | // Get Serial number from a EEPROM device. Assumes it is the only device on the bus.[[BR]] |
64 | | // baseaddr is the base address of the EEPROM device[[BR]] |
65 | | // returns a memory array containing the 1 byte family code, 6 byte serial[[BR]] |
66 | | // serial number and 1 byte CRC value[[BR]] |
| 71 | '''''void WarpEEPROM_ReadDSSerial(unsigned int* baseaddr, unsigned char *Serial)'''''[[BR]] |
| 72 | - Get Serial number from a EEPROM device. Assumes it is the only device on the bus.[[BR]] |
| 73 | - ''baseaddr'' is the base address of the EEPROM peripheral[[BR]] |
| 74 | - ''*Serial'' is a pointer to an 8 byte array |
| 75 | - returns a memory array containing the 1 byte family code, 6 byte serial[[BR]] |
| 76 | serial number and 1 byte CRC value[[BR]] |
68 | | '''''char WarpEEPROM_ReadUserMem(unsigned int* baseaddr, char page, char sector, unsigned char *array);'''''[[BR]] |
69 | | // This function reads from a specified memory location in the 1024-bit memory.[[BR]] |
70 | | // Returns an 8-byte sector of the EEPROM. [[BR]] |
71 | | // baseaddr is the base address of the EEPROM device[[BR]] |
72 | | // page must be 1-3, and refers to memory pages on the device[[BR]] |
73 | | // sector must be 1-3, and refers to the appropriate sector on the device[[BR]] |
74 | | // array must be an 8 byte array[[[BR]] |
75 | | // Returns SUCCESS if no error, otherwise FAILURE[[BR]] |
| 78 | '''''char WarpEEPROM_ReadUserMem(unsigned int* baseaddr, char page, char sector, unsigned char *array)'''''[[BR]] |
| 79 | - This function reads from a specified memory location in the 1024-bit memory.[[BR]] |
| 80 | - Returns an 8-byte sector of the EEPROM. [[BR]] |
| 81 | - ''baseaddr'' is the base address of the EEPROM peripheral[[BR]] |
| 82 | - ''page'' must be 1-3, and refers to memory pages on the device[[BR]] |
| 83 | - ''sector'' must be 1-3, and refers to the appropriate sector on the device[[BR]] |
| 84 | - ''*array'' is a pointer to an 8-byte array[[[BR]] |
| 85 | - Returns SUCCESS (0x00) if no error, otherwise FAILURE (0xff) [[BR]] |
77 | | '''''char WarpEEPROM_WriteUserMem(unsigned int* baseaddr, char page, char sector, unsigned char *array);'''''[[BR]] |
78 | | // Writes a given 8-byte array to a designated location in memory.[[BR]] |
79 | | // Essentially a wrapper of the !WriteScratch, !ReadScratch and Scratch2Mem functions[[BR]] |
80 | | // baseaddr is the base address of the EEPROM device[[BR]] |
81 | | // page must be 1-3, and refers to memory pages on the device[[BR]] |
82 | | // sector must be 1-3, and refers to the appropriate sector on the device[[BR]] |
83 | | // array must be an 8 byte array[[BR]] |
| 87 | '''''char WarpEEPROM_WriteUserMem(unsigned int* baseaddr, char page, char sector, unsigned char *array)'''''[[BR]] |
| 88 | - Writes a given 8-byte array to a designated location in memory.[[BR]] |
| 89 | - Essentially a wrapper of the !WriteScratch, !ReadScratch and Scratch2Mem functions[[BR]] |
| 90 | - ''baseaddr'' is the base address of the EEPROM peripheral[[BR]] |
| 91 | - ''page'' must be 1-3, and refers to memory pages on the device[[BR]] |
| 92 | - ''sector'' must be 1-3, and refers to the appropriate sector on the device[[BR]] |
| 93 | - ''*array'' is a pointer to an 8-byte array[[BR]] |
| 94 | - Returns SUCCESS (0x00) if all goes well, FAILURE (0xff) otherwise [[BR]] |