#include "trbnet.h"
-const char trbnet_version[] = "$Revision: 1.6 $";
+const char trbnet_version[] = "$Revision: 1.7 $";
unsigned int trb_debug = 0;
unsigned int trb_dma = 0;
int fpga_register_read(uint16_t reg_address, uint32_t* value)
{
- return -1;
-}
+ enum clnt_stat status;
+ RetVal retVal;
+
+ if (trb_client == NULL) return -1;
+ retVal.data.Buffer_val = value;
+ retVal.data.Buffer_len = 1;
+
+ status = fpga_register_read_1(reg_address,
+ &retVal, trb_client);
+
+ if (status != RPC_SUCCESS) {
+ /*
+ * An error occurred while calling the server.
+ * Print error message and stop.
+ */
+ clnt_perror(trb_client, trb_server);
+ return -1;
+ }
+
+ copyStatus(&retVal.status);
+ return retVal.status.retVal;
+}
int fpga_register_write(uint16_t reg_address, uint32_t value)
{