Programme carte strategie (disco)
Dependencies: mbed SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac
Conv_data_CAN/conv_data.cpp@60:c7632af62d21, 2019-05-23 (annotated)
- Committer:
- kyxstark
- Date:
- Thu May 23 15:53:48 2019 +0000
- Revision:
- 60:c7632af62d21
- Parent:
- 31:833fc481b002
Carte strat plus lib , mais programme
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Sitkah | 30:a1e37af4bbde | 1 | #include "global.h" |
Sitkah | 30:a1e37af4bbde | 2 | |
Sitkah | 30:a1e37af4bbde | 3 | short char_to_short_transformation(char input1, char input2) |
Sitkah | 30:a1e37af4bbde | 4 | { |
Sitkah | 30:a1e37af4bbde | 5 | short output = 0; |
Sitkah | 30:a1e37af4bbde | 6 | |
Sitkah | 30:a1e37af4bbde | 7 | output = input2<<8; |
Sitkah | 30:a1e37af4bbde | 8 | output += input1; |
Sitkah | 30:a1e37af4bbde | 9 | |
Sitkah | 30:a1e37af4bbde | 10 | return output; |
Sitkah | 30:a1e37af4bbde | 11 | } |
Sitkah | 30:a1e37af4bbde | 12 | |
Sitkah | 30:a1e37af4bbde | 13 | void short_to_char_transformation(char* output1, char* output2, short input) |
Sitkah | 30:a1e37af4bbde | 14 | { |
Sitkah | 30:a1e37af4bbde | 15 | *output1 = input & 0x00FF; |
Sitkah | 30:a1e37af4bbde | 16 | |
Sitkah | 30:a1e37af4bbde | 17 | *output2 = (input & 0xFF00)>>8; |
Sitkah | 31:833fc481b002 | 18 | } |
Sitkah | 31:833fc481b002 | 19 |