= Software Notes = * Control Files * Src: * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/src/commands.c commands.c]: includes the commands.h header file which is located right below it on the list of files. These are a bunch of hook definitions. The first few seem to be user defined code. * There is one that is incomplete: DR_GetStatus. * The two functions below that (Clear feature and set feature) are simply defined as return true, this could be a problem, i'm guessing the function definition should be more than just that. * DR_VendorCmnd: what is the array SetUpDat and where is it defined? What is being stored in it becuase the only things mentioned in the comments are only relevent for SetUpDat[2 and 3]. The function is a switch structure based off of the value in SETUPDAT[1] * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/src/commands.h commands.h]: defines all the variables that are used in commands.c but none of the functions are prototyped here. Do they need to be prototyped? no files are included * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/src/eeprom_init.c eeprom_init.c]: includes usrp_commons.h, usrp_commands.h, and spi.h * write_byte_msb takes in unsigned char v and circular shifts it 8 times each time outputting the msb * eeprom_init configures the IO ports * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/src/eeprom_io.c eeprom_io.c]: includes eeprom_io.h, i2c.h, delay.h. and has a read and write function defined within it * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/src/eeprom_io.h eeprom_io.h]: prototypes the two functions used in eeprom_io.c * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/src/error_no.h error_no.h]: defines a lot of errors * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/src/fpga.c fpga.c]: includes noisegen_regs.h, error_no.h, fpga.h * possible typo: ConfigSatate * fpga_done only has a return true definition, perhaps more code is required * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/src/fpga.h fpga.h]: defines the states of the xilinx state machine. prototypes the functions used in fpga.c * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/src/fpga_specific.c fpga_specific.c]: include fpga_specific.h * return types are all false on these functions * functions to read and write various configuration bits and send rf data * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/src/fpga_specific.h fpga_specific.h]: defines the ports used but doesn't prototype the functions used in fpga_specific.c * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/src/gpif.c gpif.c]: configures the general purpose interface for fx2, most of code has do not edit warnings * gpifinit function is added after a line that says "you may add additional code below" * all the do not edit sections have been commented out * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/src/init_gpif.c init_gpif.c]: include usrp_common.h * some very strange comments in this file, not sure if they are alerting to current problems or ones that were already addressed previously * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/src/led.c led.c]: includes fx2regs.h, noisegen_regs.h, led.h * all functions (except for the switch) return 0 * not entirely sure what the switch structure is trying to accomplish, nor what the error blink fnc above it is doing * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/src/led.h led.h]: defines the cases for the switch and also all the functions used in led.c * Lib: Missing Delay.h, fx2regs.h, fx2utils.h, syncdelay.h * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/lib/delay.c delay.c]: Contains Microsecond and Millisecond delays, 1 Bus Cycle = 4 Clock Cycles, mdelay function is not accurate, must be tuned * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/lib/fx2utils.c fx2utils.c]: USB functionality, delay tuned * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/lib/i2c-compiler-bug.c i2c-compiler-bug.c]: Identical to i2c.c except for commented line * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/lib/i2c.c i2c.c]: Seems complete, no fixes commented * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/lib/isr.c isr.c]: Seems complete, no fixes commented, has sv,uv, and fgv hooks * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/lib/timer.c timer.c]: Called at 100Hz, resets RCAP2?, calls hook sv, no fixes commented * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/firmware/lib/usb_common.c usb_common.c]: Needs changes and clarification, usb alt settings for interface may need changing * Firmware Files * Driver Files * Windows * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/windows-driver/NoiseGenerator/boardcommands.h boardcommands.h]: Defines commands that allow the user to adjust the operation of the device * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/windows-driver/NoiseGenerator/cyapi.h cyapi.h]: Standard file, defines an api to interface with a cypress usb device * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/windows-driver/NoiseGenerator/MainForm.h mainform.h]: Interface to noisegen program, requires additions to constructor code although form seems completely drawn * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/windows-driver/NoiseGenerator/NoiseBoard.cpp noiseboard.cpp]: Code to manage board behavior, update fpga * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/windows-driver/NoiseGenerator/NoiseGenerator.cpp noisegenerator.cpp]: Top-level, launches mainform to start program * [http://orbit-lab.org/browser/USBNoiseGenreator/trunk/windows-driver/NoiseGenerator/RegisterFormEntry.h registerformentry.h]: Not sure what this is, may need to change the way register coordinates are calculated * Other files in this directory are either auto-generated by Visual C++ or merely include/define things for other files