Fixed boot command to work with old and new bootloader master
authorTonyCave <t-cave@ti.com>
Thu, 19 Dec 2013 20:44:44 +0000 (20:44 +0000)
committerTonyCave <t-cave@ti.com>
Thu, 19 Dec 2013 20:44:44 +0000 (20:44 +0000)
zbSocDriver/.zbSocCmd.c.swp [new file with mode: 0644]
zbSocDriver/zbSocCmd.c

diff --git a/zbSocDriver/.zbSocCmd.c.swp b/zbSocDriver/.zbSocCmd.c.swp
new file mode 100644 (file)
index 0000000..5ebc0db
Binary files /dev/null and b/zbSocDriver/.zbSocCmd.c.swp differ
index 22d8fd1c05f5538bacc067265808c0d51b51154e..9eb1a01c465ce57a229832bb8dfe9918fd33bf07 100755 (executable)
@@ -169,6 +169,9 @@ len,   /*RPC payload Len                                      */     \
 /*******************************/
 #define SB_FORCE_BOOT               0xF8
 #define SB_FORCE_RUN               (SB_FORCE_BOOT ^ 0xFF)
+#define SB_FORCE_BOOT_1             0x10
+#define SB_FORCE_RUN_1             (SB_FORCE_BOOT_1 ^ 0xFF)
+
 
 typedef enum {
        MT_RPC_CMD_POLL = 0x00,
@@ -298,8 +301,8 @@ int32_t zbSocOpen(char *devicePath)
        tcsetattr(serialPortFd, TCSANOW, &tio);
 
        //Send the bootloader force boot incase we have a bootloader that waits
-       uint8_t forceBoot = SB_FORCE_RUN;
-       zbSocTransportWrite(&forceBoot, 1);
+       uint8_t forceBoot[] = {SB_FORCE_RUN, SB_FORCE_RUN_1};
+       zbSocTransportWrite(forceBoot, 2);
 
        return serialPortFd;
 }
@@ -1519,7 +1522,7 @@ void processRpcSysZdo(uint8_t *rpcBuff)
        }
        else
        {
-               printf("processRpcSysZdo: Unsupported MT ZDO Msg\n");
+               //printf("processRpcSysZdo: Unsupported MT ZDO Msg\n");
        }
 
        return;
@@ -1677,8 +1680,7 @@ void zbSocProcessRpc(void)
 
                                default:
                                {
-                                       printf("zbSocProcessRpc: CMD0:%x, CMD1:%x, not handled\n", rpcBuff[0],
-                                                       rpcBuff[1]);
+                                       //printf("zbSocProcessRpc: CMD0:%x, CMD1:%x, not handled\n", rpcBuff[0] , rpcBuff[1])
                                        break;
                                }
                        }