]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
update
authorhadaq <hadaq>
Fri, 28 Aug 2009 17:44:22 +0000 (17:44 +0000)
committerhadaq <hadaq>
Fri, 28 Aug 2009 17:44:22 +0000 (17:44 +0000)
libtrbnet/trbnet.c
libtrbnet/trbnet.h

index 8fa89ce4e8b125932f198ad477b60c00b2ca6262..c436c2aff24c4ceb79959f9f0d78e469de552938 100644 (file)
@@ -1099,7 +1099,7 @@ int trb_register_write_mem(uint16_t trb_address,
                            uint16_t reg_address,
                            uint8_t option,
                            const  uint32_t *data,
-                           uint16_t dsize)
+                           uint16_t size)
 {
   uint16_t config;
   uint16_t i;
@@ -1108,8 +1108,8 @@ int trb_register_write_mem(uint16_t trb_address,
   trb_errno = TRB_NONE;
 
   /* check size and set write-mode */
-  config = dsize & 0x7fff;
-  if ((dsize == 0) || (dsize != config)) {
+  config = size & 0x7fff;
+  if ((size == 0) || (size != config)) {
     trb_errno = TRB_INVALID_LENGTH;
     return -1;
   }
@@ -1135,7 +1135,7 @@ int trb_register_write_mem(uint16_t trb_address,
   write32_to_FPGA(CHANNEL_3_SENDER_DATA, config);
   write32_to_FPGA(CHANNEL_3_SENDER_DATA, 0x00000000);
   write32_to_FPGA(CHANNEL_3_SENDER_DATA, 0x00000000);
-  for (i = 0; i < dsize; i++) {
+  for (i = 0; i < size; i++) {
     write32_to_FPGA(CHANNEL_3_SENDER_DATA, 0x00000000);
     write32_to_FPGA(CHANNEL_3_SENDER_DATA, (data[i] >> 16) & 0xffff);
     write32_to_FPGA(CHANNEL_3_SENDER_DATA, data[i] & 0xffff);
index 7c27a470f3379f67ae964cfd77ea880f9c8f74a9..ea9e52c2e2491f5200d01a2c817568cd3e34236e 100644 (file)
@@ -32,7 +32,7 @@ int trb_register_write_mem(uint16_t trb_address,
                            uint16_t reg_address,                             
                            uint8_t option,
                            const  uint32_t* data,
-                           uint16_t dsize);
+                           uint16_t size);
 
 int trb_read_uid(uint16_t trb_address,                                  
                  uint32_t* data,
@@ -128,7 +128,7 @@ int trb_fifo_flush(uint8_t channel);
    trb_address. The received data is stored in the Data-Buffer data.
    
    The format of the Data-Buffer is:
-    first word:  TRB-Address of the sender
+    first word:  TRB-Address of the sender (Lower 2Bytes), len (Upper 2bytes)
     second word: register value
    
    --> The size of the Data-Buffer must be at least >= 2