groke6@381: /* groke6@381: This file is part of CanFestival, a library implementing CanOpen Stack. groke6@381: groke6@381: Copyright (C): Edouard TISSERANT , Francis DUPIN and Jorge BERZOSA groke6@381: groke6@381: See COPYING file for copyrights details. groke6@381: groke6@381: This library is free software; you can redistribute it and/or groke6@381: modify it under the terms of the GNU Lesser General Public groke6@381: License as published by the Free Software Foundation; either groke6@381: version 2.1 of the License, or (at your option) any later version. groke6@381: groke6@381: This library is distributed in the hope that it will be useful, groke6@381: but WITHOUT ANY WARRANTY; without even the implied warranty of groke6@381: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU groke6@381: Lesser General Public License for more details. groke6@381: groke6@381: You should have received a copy of the GNU Lesser General Public groke6@381: License along with this library; if not, write to the Free Software groke6@381: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA groke6@381: */ groke6@381: groke6@381: #include "Master.h" groke6@381: #include "SlaveA.h" groke6@381: #include "SlaveB.h" groke6@384: #include "TestMasterSlaveLSS.h" groke6@384: groke6@384: extern s_BOARD MasterBoard; groke6@381: /*****************************************************************************/ groke6@381: void TestMaster_heartbeatError(CO_Data* d, UNS8 heartbeatID) groke6@381: { groke6@381: eprintf("TestMaster_heartbeatError %d\n", heartbeatID); groke6@381: } groke6@381: groke6@381: /******************************************************** groke6@381: * TestMaster_initialisation is responsible to groke6@381: * - setup master RPDO 1 to receive TPDO 1 from id 2 groke6@381: * - setup master RPDO 2 to receive TPDO 1 from id 3 groke6@381: ********************************************************/ groke6@381: void TestMaster_initialisation(CO_Data* d) groke6@381: { groke6@381: UNS32 PDO1_COBID = 0x0182; groke6@381: UNS32 PDO2_COBID = 0x0183; Mongo@717: UNS32 size = sizeof(UNS32); groke6@381: groke6@381: eprintf("TestMaster_initialisation\n"); groke6@381: groke6@381: /***************************************** groke6@381: * Define RPDO to match slave ID=2 TPDO1* groke6@381: *****************************************/ groke6@381: writeLocalDict( &TestMaster_Data, /*CO_Data* d*/ groke6@381: 0x1400, /*UNS16 index*/ groke6@381: 0x01, /*UNS8 subind*/ groke6@381: &PDO1_COBID, /*void * pSourceData,*/ groke6@381: &size, /* UNS8 * pExpectedSize*/ groke6@381: RW); /* UNS8 checkAccess */ groke6@381: groke6@381: /***************************************** groke6@381: * Define RPDO to match slave ID=3 TPDO1* groke6@381: *****************************************/ groke6@381: writeLocalDict( &TestMaster_Data, /*CO_Data* d*/ groke6@381: 0x1401, /*UNS16 index*/ groke6@381: 0x01, /*UNS8 subind*/ groke6@381: &PDO2_COBID, /*void * pSourceData,*/ groke6@381: &size, /* UNS8 * pExpectedSize*/ groke6@381: RW); /* UNS8 checkAccess */ groke6@381: groke6@381: } groke6@381: groke6@381: // Step counts number of times ConfigureSlaveNode is called groke6@381: // There is one per each slave groke6@381: static init_step[] ={0,0}; groke6@381: groke6@381: /*Forward declaration*/ groke6@381: static void ConfigureSlaveNode(CO_Data* d, UNS8 nodeId); groke6@381: groke6@381: static void CheckSDOAndContinue(CO_Data* d, UNS8 nodeId) groke6@381: { groke6@381: UNS32 abortCode; groke6@381: if(getWriteResultNetworkDict (d, nodeId, &abortCode) != SDO_FINISHED) Mongo@717: eprintf("Master : Failed in initializing slave %2.2x, AbortCode :%4.4x \n", nodeId, abortCode); groke6@381: groke6@381: /* Finalise last SDO transfer with this node */ groke6@381: closeSDOtransfer(&TestMaster_Data, nodeId, SDO_CLIENT); groke6@381: groke6@381: ConfigureSlaveNode(d, nodeId); groke6@381: } groke6@381: groke6@381: /******************************************************** groke6@381: * ConfigureSlaveNode is responsible to groke6@381: * - setup slave 'n' TPDO 1 transmit type groke6@381: * - setup slave 'n' Producer Hertbeat Time groke6@381: * - setup the Consumer Heartbeat Time for slave 'n' groke6@381: * - switch to operational mode groke6@381: * - send NMT to slave groke6@381: ******************************************************** groke6@381: * This an example of : groke6@381: * Network Dictionary Access (SDO) with Callback groke6@381: * Slave node state change request (NMT) groke6@381: ******************************************************** groke6@381: * This is called first by TestMaster_post_SlaveBootup groke6@381: * after the LSS configuration has been done groke6@381: * then it called again each time a SDO exchange is groke6@381: * finished. groke6@381: ********************************************************/ groke6@381: groke6@381: static void ConfigureSlaveNode(CO_Data* d, UNS8 nodeId) groke6@381: { groke6@381: /* Master configure heartbeat producer time at 0 ms groke6@381: * for slaves node-id 0x02 and 0x03 by DCF concise */ groke6@381: groke6@381: UNS8 Transmission_Type = 0x01; groke6@381: UNS16 Slave_Prod_Heartbeat_T=1000;//ms groke6@381: UNS32 Master_Cons_Heartbeat_Base=0x05DC; //1500ms groke6@381: UNS32 abortCode; groke6@381: UNS8 res; groke6@381: eprintf("Master : ConfigureSlaveNode %2.2x\n", nodeId); groke6@381: groke6@381: switch(++init_step[nodeId-2]){ groke6@381: case 1: /*First step : setup Slave's TPDO 1 to be transmitted on SYNC*/ groke6@381: eprintf("Master : set slave %2.2x TPDO 1 transmit type\n", nodeId); groke6@381: res = writeNetworkDictCallBack (d, /*CO_Data* d*/ groke6@381: nodeId, /*UNS8 nodeId*/ groke6@381: 0x1800, /*UNS16 index*/ groke6@381: 0x02, /*UNS8 subindex*/ groke6@381: 1, /*UNS8 count*/ groke6@381: 0, /*UNS8 dataType*/ groke6@381: &Transmission_Type,/*void *data*/ Mongo@717: CheckSDOAndContinue, /*SDOCallback_t Callback*/ Mongo@717: 0); /*UNS8 useBlockMode*/ groke6@381: break; groke6@381: case 2: /* Second step : Set the new heartbeat producer time in the slave */ groke6@381: { groke6@381: UNS32 Master_Cons_Heartbeat_T=Master_Cons_Heartbeat_Base + (nodeId * 0x10000); Mongo@718: UNS32 size = sizeof(UNS32); groke6@381: groke6@381: eprintf("Master : set slave %2.2x Producer Heartbeat Time = %d\n", nodeId,Slave_Prod_Heartbeat_T); groke6@381: res = writeNetworkDictCallBack (d, /*CO_Data* d*/ groke6@381: nodeId, /*UNS8 nodeId*/ groke6@381: 0x1017, /*UNS16 index*/ groke6@381: 0x00, /*UNS8 subindex*/ groke6@381: 2, /*UNS8 count*/ groke6@381: 0, /*UNS8 dataType*/ groke6@381: &Slave_Prod_Heartbeat_T,/*void *data*/ Mongo@717: CheckSDOAndContinue, /*SDOCallback_t Callback*/ Mongo@717: 0); /*UNS8 useBlockMode*/ groke6@381: break; groke6@381: groke6@381: /* Set the new heartbeat consumer time in the master*/ groke6@381: eprintf("Master : set Consumer Heartbeat Time for slave %2.2x = %d\n", nodeId,Master_Cons_Heartbeat_T); groke6@381: writeLocalDict( &TestMaster_Data, /*CO_Data* d*/ groke6@381: 0x1016, /*UNS16 index*/ groke6@381: nodeId-1, /*UNS8 subind*/ groke6@381: &Master_Cons_Heartbeat_T, /*void * pSourceData,*/ groke6@381: &size, /* UNS8 * pExpectedSize*/ groke6@381: RW); /* UNS8 checkAccess */ groke6@381: } groke6@381: break; groke6@381: case 3: groke6@381: groke6@381: /****************************** START *******************************/ groke6@381: groke6@381: /* Put the master in operational mode */ groke6@381: setState(d, Operational); groke6@381: groke6@381: /* Ask slave node to go in operational mode */ groke6@381: masterSendNMTstateChange (d, nodeId, NMT_Start_Node); groke6@381: } groke6@381: } groke6@381: groke6@381: static void ConfigureLSSNode(CO_Data* d); groke6@381: // Step counts number of times ConfigureLSSNode is called groke6@381: UNS8 init_step_LSS=1; groke6@381: groke6@381: static void CheckLSSAndContinue(CO_Data* d, UNS8 command) groke6@381: { groke6@381: UNS32 dat1; groke6@381: UNS8 dat2; groke6@381: groke6@381: printf("CheckLSS->"); groke6@381: if(getConfigResultNetworkNode (d, command, &dat1, &dat2) != LSS_FINISHED){ groke6@381: eprintf("Master : Failed in LSS comand %d. Trying again\n", command); groke6@381: } groke6@381: else groke6@381: { groke6@381: init_step_LSS++; groke6@381: groke6@381: switch(command){ groke6@381: case LSS_CONF_NODE_ID: groke6@381: switch(dat1){ groke6@381: case 0: printf("Node ID change succesful\n");break; groke6@381: case 1: printf("Node ID change error:out of range\n");break; groke6@381: case 0xFF:printf("Node ID change error:specific error\n");break; groke6@381: default:break; groke6@381: } groke6@381: break; groke6@381: case LSS_CONF_BIT_TIMING: groke6@381: switch(dat1){ groke6@381: case 0: printf("Baud rate change succesful\n");break; groke6@381: case 1: printf("Baud rate change error: change baud rate not supported\n");break; groke6@381: case 0xFF:printf("Baud rate change error:specific error\n");break; groke6@381: default:break; groke6@381: } groke6@381: break; groke6@381: case LSS_CONF_STORE: groke6@381: switch(dat1){ groke6@381: case 0: printf("Store configuration succesful\n");break; groke6@381: case 1: printf("Store configuration error:not supported\n");break; groke6@381: case 0xFF:printf("Store configuration error:specific error\n");break; groke6@381: default:break; groke6@381: } groke6@381: break; groke6@381: case LSS_CONF_ACT_BIT_TIMING: groke6@381: if(dat1==0){ groke6@381: UNS8 LSS_mode=LSS_WAITING_MODE; groke6@381: UNS32 SINC_cicle=50000;// us Mongo@718: UNS32 size = sizeof(UNS32); groke6@381: groke6@381: /* The slaves are now configured (nodeId and Baudrate) via the LSS services. groke6@381: * Switch the LSS state to WAITING and restart the slaves. */ groke6@517: groke6@517: /*TODO: change the baud rate of the master!!*/ groke6@384: MasterBoard.baudrate="250K"; groke6@517: groke6@517: groke6@381: printf("Master : Switch Delay period finished. Switching to LSS WAITING state\n"); groke6@384: configNetworkNode(d,LSS_SM_GLOBAL,&LSS_mode,0,NULL); groke6@381: groke6@381: printf("Master : Restarting all the slaves\n"); groke6@517: masterSendNMTstateChange (d, 0x00, NMT_Reset_Comunication); groke6@381: groke6@381: printf("Master : Starting the SYNC producer\n"); groke6@384: writeLocalDict( d, /*CO_Data* d*/ groke6@381: 0x1006, /*UNS16 index*/ groke6@381: 0x00, /*UNS8 subind*/ groke6@381: &SINC_cicle, /*void * pSourceData,*/ groke6@381: &size, /* UNS8 * pExpectedSize*/ groke6@381: RW); /* UNS8 checkAccess */ groke6@381: groke6@381: return; groke6@381: } groke6@381: else{ groke6@384: UNS16 Switch_delay=1; groke6@384: UNS8 LSS_mode=LSS_CONFIGURATION_MODE; groke6@384: groke6@384: eprintf("Master : unable to activate bit timing. trying again\n"); groke6@384: configNetworkNode(d,LSS_CONF_ACT_BIT_TIMING,&Switch_delay,0,CheckLSSAndContinue); groke6@384: return; groke6@381: } groke6@381: break; groke6@381: case LSS_SM_SELECTIVE_SERIAL: groke6@381: printf("Slave in LSS CONFIGURATION state\n"); groke6@381: break; groke6@381: case LSS_IDENT_REMOTE_SERIAL_HIGH: groke6@381: printf("node identified\n"); groke6@381: break; groke6@381: case LSS_IDENT_REMOTE_NON_CONF: groke6@381: if(dat1==0) groke6@381: eprintf("There are no-configured remote slave(s) in the net\n"); groke6@381: else groke6@381: { groke6@381: UNS16 Switch_delay=1; groke6@381: UNS8 LSS_mode=LSS_CONFIGURATION_MODE; groke6@381: groke6@381: /*The configuration of the slaves' nodeId ended. groke6@381: * Start the configuration of the baud rate. */ groke6@381: eprintf("Master : There are not no-configured slaves in the net\n", command); groke6@381: eprintf("Switching all the nodes to LSS CONFIGURATION state\n"); groke6@384: configNetworkNode(d,LSS_SM_GLOBAL,&LSS_mode,0,NULL); groke6@381: eprintf("LSS=>Activate Bit Timing\n"); groke6@384: configNetworkNode(d,LSS_CONF_ACT_BIT_TIMING,&Switch_delay,0,CheckLSSAndContinue); groke6@381: return; groke6@381: } groke6@381: break; groke6@381: case LSS_INQ_VENDOR_ID: groke6@381: printf("Slave VendorID %x\n", dat1); groke6@381: break; groke6@381: case LSS_INQ_PRODUCT_CODE: groke6@381: printf("Slave Product Code %x\n", dat1); groke6@381: break; groke6@381: case LSS_INQ_REV_NUMBER: groke6@381: printf("Slave Revision Number %x\n", dat1); groke6@381: break; groke6@381: case LSS_INQ_SERIAL_NUMBER: groke6@381: printf("Slave Serial Number %x\n", dat1); groke6@381: break; groke6@381: case LSS_INQ_NODE_ID: groke6@381: printf("Slave nodeid %x\n", dat1); groke6@381: break; groke6@381: #ifdef CO_ENABLE_LSS_FS groke6@381: case LSS_IDENT_FASTSCAN: groke6@381: if(dat1==0) groke6@381: printf("Slave node identified with FastScan\n"); groke6@381: else groke6@381: { groke6@381: printf("There is not unconfigured node in the net\n"); groke6@381: return; groke6@381: } groke6@381: init_step_LSS++; groke6@381: break; groke6@381: #endif groke6@381: groke6@381: } groke6@381: } groke6@381: groke6@381: printf("\n"); groke6@381: ConfigureLSSNode(d); groke6@381: } groke6@381: groke6@381: /* Initial nodeID and VendorID. They are incremented by one for each slave*/ groke6@381: UNS8 NodeID=0x02; groke6@381: UNS32 Vendor_ID=0x12345678; groke6@381: groke6@381: /* Configuration of the nodeID and baudrate with LSS services: groke6@381: * --First ask if there is a node with an invalid nodeID. groke6@381: * --If FastScan is activated it is used to put the slave in the state “configuration”. groke6@381: * --If FastScan is not activated, identification services are used to identify the slave. Then groke6@381: * switch mode service is used to put it in configuration state. groke6@381: * --Next, all the inquire services are used (only for example) and a valid nodeId and a groke6@381: * new baudrate are assigned to the slave. groke6@381: * --Finally, the slave's LSS state is restored to “waiting” and all the process is repeated groke6@381: * again until there isn't any node with an invalid nodeID. groke6@381: * --After the configuration of all the slaves finished the LSS state of all of them is switched groke6@381: * again to "configuration" and the Activate Bit Timing service is requested. On sucessfull, the groke6@381: * LSS state is restored to "waiting" and NMT state is changed to reset (by means of the NMT services). groke6@381: * */ groke6@381: static void ConfigureLSSNode(CO_Data* d) groke6@381: { groke6@381: UNS32 Product_Code=0x90123456; groke6@381: UNS32 Revision_Number=0x78901234; groke6@381: UNS32 Serial_Number=0x56789012; groke6@381: UNS32 Revision_Number_high=0x78901240; groke6@381: UNS32 Revision_Number_low=0x78901230; groke6@381: UNS32 Serial_Number_high=0x56789020; groke6@381: UNS32 Serial_Number_low=0x56789010; groke6@381: UNS8 LSS_mode=LSS_WAITING_MODE; groke6@381: UNS8 Baud_Table=0; groke6@384: //UNS8 Baud_BitTiming=3; groke6@384: char* Baud_BitTiming="250K"; groke6@381: UNS8 res; groke6@381: eprintf("ConfigureLSSNode step %d -> ",init_step_LSS); groke6@381: groke6@381: switch(init_step_LSS){ groke6@381: case 1: /* LSS=>identify non-configured remote slave */ groke6@381: eprintf("LSS=>identify no-configured remote slave(s)\n"); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_IDENT_REMOTE_NON_CONF,0,0,CheckLSSAndContinue); groke6@381: break; groke6@381: #ifdef CO_ENABLE_LSS_FS groke6@381: case 2: /* LSS=>FastScan */ groke6@517: { groke6@517: lss_fs_transfer_t lss_fs; groke6@381: eprintf("LSS=>FastScan\n"); groke6@517: /* The VendorID and ProductCode are partialy known, except the last two digits (8 bits). */ groke6@517: lss_fs.FS_LSS_ID[0]=Vendor_ID; groke6@517: lss_fs.FS_BitChecked[0]=8; groke6@517: lss_fs.FS_LSS_ID[1]=Product_Code; groke6@517: lss_fs.FS_BitChecked[1]=8; groke6@517: /* serialNumber and RevisionNumber are unknown, i.e. the 8 digits (32bits) are unknown. */ groke6@517: lss_fs.FS_BitChecked[2]=32; groke6@517: lss_fs.FS_BitChecked[3]=32; groke6@517: res=configNetworkNode(&TestMaster_Data,LSS_IDENT_FASTSCAN,&lss_fs,0,CheckLSSAndContinue); groke6@517: } groke6@517: break; groke6@381: #else groke6@381: case 2: /* LSS=>identify node */ groke6@381: eprintf("LSS=>identify node\n"); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_IDENT_REMOTE_VENDOR,&Vendor_ID,0,NULL); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_IDENT_REMOTE_PRODUCT,&Product_Code,0,NULL); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_IDENT_REMOTE_REV_LOW,&Revision_Number_low,0,NULL); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_IDENT_REMOTE_REV_HIGH,&Revision_Number_high,0,NULL); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_IDENT_REMOTE_SERIAL_LOW,&Serial_Number_low,0,NULL); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_IDENT_REMOTE_SERIAL_HIGH,&Serial_Number_high,0,CheckLSSAndContinue); groke6@381: break; groke6@381: case 3: /*LSS=>put in configuration mode*/ groke6@381: eprintf("LSS=>put in configuration mode\n"); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_SM_SELECTIVE_VENDOR,&Vendor_ID,0,NULL); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_SM_SELECTIVE_PRODUCT,&Product_Code,0,NULL); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_SM_SELECTIVE_REVISION,&Revision_Number,0,NULL); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_SM_SELECTIVE_SERIAL,&Serial_Number,0,CheckLSSAndContinue); groke6@381: Vendor_ID++; groke6@381: break; groke6@381: #endif groke6@381: case 4: /* LSS=>inquire nodeID */ groke6@381: eprintf("LSS=>inquire nodeID\n"); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_INQ_NODE_ID,0,0,CheckLSSAndContinue); groke6@381: break; groke6@381: case 5: /* LSS=>inquire VendorID */ groke6@381: eprintf("LSS=>inquire VendorID\n"); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_INQ_VENDOR_ID,0,0,CheckLSSAndContinue); groke6@381: break; groke6@381: case 6: /* LSS=>inquire Product code */ groke6@381: eprintf("LSS=>inquire Product code\n"); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_INQ_PRODUCT_CODE,0,0,CheckLSSAndContinue); groke6@381: break; groke6@381: case 7: /* LSS=>inquire Revision Number */ groke6@381: eprintf("LSS=>inquire Revision Number\n"); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_INQ_REV_NUMBER,0,0,CheckLSSAndContinue); groke6@381: break; groke6@381: case 8: /* LSS=>inquire Serial Number */ groke6@381: eprintf("LSS=>inquire Serial Number\n"); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_INQ_SERIAL_NUMBER,0,0,CheckLSSAndContinue); groke6@381: break; groke6@381: case 9: /* LSS=>change the nodeID */ groke6@381: eprintf("LSS=>change the nodeId\n"); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_CONF_NODE_ID,&NodeID,0,CheckLSSAndContinue); groke6@381: NodeID++; groke6@381: break; groke6@381: case 10: /* LSS=>change the Baud rate */ groke6@381: eprintf("LSS=>change the Baud rate\n"); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_CONF_BIT_TIMING,&Baud_Table,&Baud_BitTiming,CheckLSSAndContinue); groke6@381: break; groke6@381: case 11: groke6@381: /*LSS=>store configuration*/ groke6@381: eprintf("LSS=>store configuration\n"); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_CONF_STORE,0,0,CheckLSSAndContinue); groke6@381: break; groke6@381: case 12: /* LSS=>put in waiting mode */ groke6@381: eprintf("LSS=>put in waiting mode\n"); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_SM_GLOBAL,&LSS_mode,0,NULL); groke6@381: /* Search again for no-configured slaves*/ groke6@381: eprintf("LSS=>identify no-configured remote slave(s)\n"); groke6@381: res=configNetworkNode(&TestMaster_Data,LSS_IDENT_REMOTE_NON_CONF,0,0,CheckLSSAndContinue); groke6@381: init_step_LSS=1; groke6@381: break; groke6@381: } groke6@381: } groke6@381: groke6@381: void TestMaster_preOperational(CO_Data* d) groke6@381: { groke6@381: eprintf("TestMaster_preOperational\n"); groke6@381: groke6@381: /* Ask slaves to go in stop mode */ groke6@381: masterSendNMTstateChange (d, 0, NMT_Stop_Node); groke6@381: ConfigureLSSNode(&TestMaster_Data); groke6@381: } groke6@381: groke6@381: void TestMaster_operational(CO_Data* d) groke6@381: { groke6@381: eprintf("TestMaster_operational\n"); groke6@381: } groke6@381: groke6@381: void TestMaster_stopped(CO_Data* d) groke6@381: { groke6@381: eprintf("TestMaster_stopped\n"); groke6@381: } groke6@381: groke6@381: void TestMaster_post_sync(CO_Data* d) groke6@381: { groke6@381: eprintf("TestMaster_post_sync\n"); groke6@381: eprintf("Master: %d %d %d\n", groke6@381: MasterMap1, groke6@381: MasterMap2, groke6@381: MasterMap3); groke6@381: } groke6@381: groke6@381: void TestMaster_post_emcy(CO_Data* d, UNS8 nodeID, UNS16 errCode, UNS8 errReg) groke6@381: { groke6@381: eprintf("Master received EMCY message. Node: %2.2x ErrorCode: %4.4x ErrorRegister: %2.2x\n", nodeID, errCode, errReg); groke6@381: } groke6@381: groke6@381: void TestMaster_post_TPDO(CO_Data* d) groke6@381: { groke6@381: eprintf("TestMaster_post_TPDO\n"); groke6@381: } groke6@381: groke6@381: void TestMaster_post_SlaveBootup(CO_Data* d, UNS8 nodeid) groke6@381: { groke6@381: eprintf("TestMaster_post_SlaveBootup %x\n", nodeid); groke6@381: /* Wait until the new baud rate is stored before configure the slaves*/ groke6@381: if(MasterBoard.baudrate=="250K") groke6@381: ConfigureSlaveNode(d, nodeid); groke6@381: } groke6@381: