src/objacces.c
changeset 55 96173dd44f2c
parent 12 1d3b9ad366c8
child 71 95cd3376cc9f
equal deleted inserted replaced
54:a2ca09ac1523 55:96173dd44f2c
   178       #ifdef CANOPEN_BIG_ENDIAN
   178       #ifdef CANOPEN_BIG_ENDIAN
   179 	      if(dataType > boolean && dataType < visible_string)
   179 	      if(dataType > boolean && dataType < visible_string)
   180 	      {
   180 	      {
   181 			// we invert the data source directly. This let us do range testing without
   181 			// we invert the data source directly. This let us do range testing without
   182 			// additional temp variable
   182 			// additional temp variable
   183 		 	UNS8 tmp, i;
   183 		 	UNS8 i;
   184 	  		for ( i = 0 ; i < ( ptrTable->pSubindex[bSubindex].size >> 1)  ; i++) 
   184 	  		for ( i = 0 ; i < ( ptrTable->pSubindex[bSubindex].size >> 1)  ; i++) 
   185 	  		{
   185 	  		{
   186 	    		UNS8 tmp =((UNS8 *)pSourceData) [(ptrTable->pSubindex[bSubindex].size - 1) - i];
   186 	    		UNS8 tmp =((UNS8 *)pSourceData) [(ptrTable->pSubindex[bSubindex].size - 1) - i];
   187 	    		((UNS8 *)pSourceData) [(ptrTable->pSubindex[bSubindex].size - 1) - i] = ((UNS8 *)pSourceData)[i];
   187 	    		((UNS8 *)pSourceData) [(ptrTable->pSubindex[bSubindex].size - 1) - i] = ((UNS8 *)pSourceData)[i];
   188 	    		((UNS8 *)pSourceData)[i] = tmp;
   188 	    		((UNS8 *)pSourceData)[i] = tmp;