carte_strategie_2019
Dependencies: mbed SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac
Diff: Conv_data_CAN/conv_data.cpp
- Revision:
- 30:a1e37af4bbde
- Child:
- 31:833fc481b002
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Conv_data_CAN/conv_data.cpp Fri Apr 20 09:16:13 2018 +0000 @@ -0,0 +1,18 @@ +#include "global.h" + +short char_to_short_transformation(char input1, char input2) +{ + short output = 0; + + output = input2<<8; + output += input1; + + return output; +} + +void short_to_char_transformation(char* output1, char* output2, short input) +{ + *output1 = input & 0x00FF; + + *output2 = (input & 0xFF00)>>8; +} \ No newline at end of file