static int hexMode = HEXMODE;
-static const char trbcmd_version[] = "$Revision: 2.63 $";
+static const char trbcmd_version[] = "$Revision: 2.64 $";
#define BACKLOG 10
static uint16_t tcp_port = 55555;
if (trb_debug > 0) {
fprintf(stderr,
"Command: SET_ADDRESS: "
+#ifndef X86_64
"uid: 0x%016llx, "
+#else
+ "uid: 0x%016lx, "
+#endif
"endpoint: 0x%02x, "
"trb_address: 0x%04x\n", uid, endpoint, trb_address);
}
fprintf(clientout, "\n----------------------------\n\n");
fflush(clientout);
if (tcp_debug > 0) {
- fprintf(stderr, "%d: received: %i\n", myPid, msgLen);
+ fprintf(stderr, "%d: received: %i\n", myPid, (int)msgLen);
if (msgLen > 0) {
fprintf(stderr, "%d: command: ", myPid);
for (i = 1; i < (unsigned int)start_argc; i++) {
}
if (tcp_debug > 0) {
- fprintf(stderr, "%d: received: %i\n", myPid, msgLen);
+ fprintf(stderr, "%d: received: %i\n", myPid, (int)msgLen);
if (msgLen > 0) {
fprintf(stderr, "%d: command: ", myPid);
for (i = 1; i < (unsigned int)start_argc; i++) {
#include <trbnet.h>
#include <trberror.h>
-static const char trbdhcp_version[] = "$Revision: 1.4 $";
+static const char trbdhcp_version[] = "$Revision: 1.5 $";
typedef struct {
uint16_t address;
*c = '\0';
}
+#ifndef X86_64
if (sscanf(line, "%x %llx %x", &address, &uid, &endPoint) != 3) {
+#else
+ if (sscanf(line, "%x %lx %x", &address, &uid, &endPoint) != 3) {
+#endif
continue;
}
+
if (counter < NUM_ENDPOINTS) {
endPointList[counter].address = address;
endPointList[counter].uid = uid;
{
unsigned int i;
for (i = 0; i < listSize; i++) {
+#ifndef X86_64
fprintf(stdout, "Entry #%d: 0x%04x 0x%08llx 0x%02x\n", i,
+#else
+ fprintf(stdout, "Entry #%d: 0x%04x 0x%08lx 0x%02x\n", i,
+#endif
endPointList[i].address,
endPointList[i].uid,
endPointList[i].endPoint);
if (currentAddress != endPointList[j].address) {
if (trb_debug > 0) {
+#ifndef X86_64
fprintf(stderr, "set address: 0x%04x 0x%08llx 0x%02x\n",
+#else
+ fprintf(stderr, "set address: 0x%04x 0x%08lx 0x%02x\n",
+#endif
currentAddress, uid, endPoint);
}
static FlashType flashType = FLASH_INVALID;
static uint32_t manId = 0;
-static const char trbflash_version[] = "$Revision: 2.25 $";
+static const char trbflash_version[] = "$Revision: 2.26 $";
static uint32_t mdcFlashSelect = 1;
} while (trb_term.status_channel != 0);
if (status <= 0) {
- fprintf(logFile, "Error > readCtrlRegister: invalid length returned\n");
+ fprintf(logFile, "Error > readCtrlRegister: %s\n", trb_strerror());
return -1;
}