uint16_t reg_address,
uint8_t option,
const uint32_t *data,
- uint16_t dsize)
+ uint16_t size)
{
uint16_t config;
uint16_t i;
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;
}
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);
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,
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