[342] | 1 | /* Copyright (c) 2006 Rice University */ |
---|
| 2 | /* All Rights Reserved */ |
---|
| 3 | /* This code is covered by the Rice-WARP license */ |
---|
| 4 | /* See http://warp.rice.edu/license/ for details */ |
---|
| 5 | |
---|
| 6 | |
---|
[79] | 7 | #ifndef WARPSYSACE_H |
---|
| 8 | #define WARPSYSACE_H |
---|
| 9 | |
---|
| 10 | #define INVALIDRADIO -2000 |
---|
| 11 | |
---|
[341] | 12 | // The following library contains functions that provide specific CF |
---|
| 13 | // functionality. All of these require the Xilinx FAT Library to be installed |
---|
| 14 | // in MSS file. This can be done by adding the following lines of code to the |
---|
| 15 | // system's MSS file. |
---|
| 16 | // BEGIN LIBRARY |
---|
| 17 | // PARAMETER LIBRARY_NAME = xilfatfs |
---|
| 18 | // PARAMETER LIBRARY_VER = 1.00.a |
---|
| 19 | // PARAMETER CONFIG_WRITE = true |
---|
| 20 | // PARAMETER CONFIG_DIR_SUPPORT = true |
---|
| 21 | // PARAMETER CONFIG_FAT12 = false |
---|
| 22 | // PARAMETER CONFIG_MAXFILES = 5 |
---|
| 23 | // PARAMETER CONFIG_BUFCACHE_SIZE = 10240 |
---|
| 24 | // PARAMETER PROC_INSTANCE = ppc405_0 |
---|
| 25 | // END |
---|
| 26 | |
---|
[79] | 27 | // A General Append function for SysACE I/O. It takes in the |
---|
| 28 | // file to which the string needs to be appended, and the string that |
---|
| 29 | // needs to be appended. You must make sure to be located in |
---|
| 30 | // the proper directory of the file itself using the sysace_chdir function |
---|
| 31 | // detailed in the "LibXil FATFile System (FATfs)" section of http://www.xilinx.com/ise/embedded/oslibs_rm.pdf |
---|
| 32 | int WarpSysace_appendLog(char *buffer); |
---|
| 33 | |
---|
| 34 | // Reconfigures the board with the ACE file located at the newaddr location. |
---|
| 35 | // baseaddr is the base address of the SystemACE. |
---|
[341] | 36 | void WarpSysace_reconfigure(unsigned int baseaddr, unsigned int newaddr); |
---|
[79] | 37 | |
---|
[341] | 38 | // Get lock function. Must be called carefully! If lock already exists, |
---|
| 39 | // the system may freeze up. Refer to WARP tutorial for an example |
---|
| 40 | // to see proper calling techniques and the contents of function |
---|
| 41 | // WarpSysace_reconfigure where the unlock is automatically called for you |
---|
| 42 | // during after a switch! |
---|
| 43 | void WarpSysace_GetLock(unsigned int baseaddr); |
---|
[79] | 44 | |
---|
| 45 | |
---|
[341] | 46 | |
---|
[79] | 47 | // The following functions are radio board functions used that utilize the |
---|
| 48 | // sysace controller and compact flash. |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | // Get the I channel dc offset value for calibrating the radio board defined by 'radio' |
---|
| 53 | // Returns INVALIDRADIO if the radio value given does not exist or if more than one radio value is |
---|
| 54 | // given. Returns the I channel value in the normal case. |
---|
| 55 | short WarpSysace_IChanDcOffset(unsigned int radio); |
---|
| 56 | |
---|
| 57 | // Get the Q channel dc offset value for calibrating the radio board defined by 'radio'. |
---|
| 58 | // Returns INVALIDRADIO if the radio value given does not exist or if more than one radio value is |
---|
| 59 | // given. Returns the I channel value in the normal case. |
---|
| 60 | short WarpSysace_QChanDcOffset(unsigned int radio); |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | short WarpSysace_UpdateDcOffset(short ival, short qval, unsigned int radio); |
---|
| 64 | |
---|
| 65 | |
---|
| 66 | #endif |
---|
| 67 | |
---|
| 68 | |
---|