]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
bugfix
authorhadaq <hadaq>
Mon, 7 Sep 2009 20:01:37 +0000 (20:01 +0000)
committerhadaq <hadaq>
Mon, 7 Sep 2009 20:01:37 +0000 (20:01 +0000)
libtrbnet/fs_fpga_int_mem.c
libtrbnet/fs_fpga_int_mem.h

index 6202a2998d88d6d90ff745e4288e37ede9b5d029..705979bddf5da840c8df3faa7c1dbef45aaa740b 100644 (file)
@@ -19,13 +19,12 @@ void write32_to_FPGA(uint16_t address, uint32_t value)
   writePC((value & 0xffff) | (toggleBit ^ TOGGLE_BIT));
 }
 
-
 /* reads a 32bit word from a given address on a given device */
-int read32_from_FPGA(uint16_t address, uint32_t* value)
+void read32_from_FPGA(uint16_t address, uint32_t* value)
 {
   uint32_t toggleBit = readPC() & TOGGLE_BIT;
  
-  /* set address RW_WRITE */
+  /* set address RW_READ */
   writePC((address | 0x8000) | (toggleBit ^ TOGGLE_BIT));
   
   /* read value */
@@ -34,8 +33,6 @@ int read32_from_FPGA(uint16_t address, uint32_t* value)
   
   *value |= (readPB() & 0xffff);
   writePC(toggleBit ^ TOGGLE_BIT);
-  
-  return 0;
 }
 
 
index 11f61b21ba999d708da0f8624746bb751ec961a7..0f38ef7b6f41bc0e3103dd88ad147d5128c893cb 100644 (file)
@@ -3,18 +3,18 @@
 
 #include <stdint.h>
 
-/* writes a 32bit word to a given address on a given device */
+/* Writes a 32bit word to a given address on a given device */
 void write32_to_FPGA(uint16_t address, uint32_t value);
 
-/* reads a 32bit word from a given address on a given device */
-int read32_from_FPGA(uint16_t address, uint32_t* value);
+/* Reads a 32bit word from a given address on a given device */
+void read32_from_FPGA(uint16_t address, uint32_t* value);
 
-/* do not use, not yet implemented, returns -1 always */
+/* Do not use, not yet implemented, returns -1 always */
 int read32_from_FPGA_dma(uint16_t fifo_address,
                          uint32_t* values,
                          uint32_t size);
 
-/* sends reset for communication logic PC(17, 16) = 11 */
+/* sends a reset to the communication logic PC(17, 16) = 11 */
 void com_reset();
 
 #endif