From 37578afe31e3562c1ea5a9195d78a10be698bb54 Mon Sep 17 00:00:00 2001 From: hadaq Date: Fri, 28 Aug 2009 17:44:22 +0000 Subject: [PATCH] update --- libtrbnet/trbnet.c | 8 ++++---- libtrbnet/trbnet.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libtrbnet/trbnet.c b/libtrbnet/trbnet.c index 8fa89ce..c436c2a 100644 --- a/libtrbnet/trbnet.c +++ b/libtrbnet/trbnet.c @@ -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); diff --git a/libtrbnet/trbnet.h b/libtrbnet/trbnet.h index 7c27a47..ea9e52c 100644 --- a/libtrbnet/trbnet.h +++ b/libtrbnet/trbnet.h @@ -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 -- 2.43.0