/* if end of buffer has been reached, then this is the last frame */ if(CANopen_SDOC_InBuff == CANopen_SDOC_Seg_BuffSize) { CANopen_Msg_Obj.data[0] |= ([color=#f00](7-(CANopen_SDOC_Seg_BuffSize%7)[/color])<<1) | 0x01; /* save length */ CANopen_SDOC_State = CANopen_SDOC_Succes;/* set state to success */ } |
/* if end of buffer has been reached, then this is the last frame */ if(CANopen_SDOC_InBuff == CANopen_SDOC_Seg_BuffSize) { i= 7-(CANopen_SDOC_Seg_BuffSize%7);//bytes in last frame [color=#f00] if(i==7)i=0;[/color]//set all data bytes CANopen_Msg_Obj.data[0] |= (i<<1) | 0x01;/* save length */ CANopen_SDOC_State = CANopen_SDOC_Succes;/* set state to success */ } |