Hello,
today while working on ColdFire microchip with Freescale Codewarrior 6.4 I encountered a problem.
Lets say one function is composed of other functions, and when I compile the code it seems like
that this other functions aren't included in the output file.
This functions are used for separating bytes from an short or a long in and to merge 2 bytes into a short and 4 bytes into a long int. The sample code could be seen below:
When I use this function in the main function, in the neverending loop the function works and the return value corresponds to the value of 2 bytes.Code:UINT16 convert_two_bytes_to_UINT16(UINT8 *bytes) { UINT16 result = bytes[0]; result <<= 8; result |= bytes[1]; return result; }
I don't know what do to, so if somebody had simmilar problems I cindly ask them for some help.
Thanks and best regards,
BoSCHoW.