Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: CRAC-Strat_2019 SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac
Dependents: Codeprincipal_2019 CRAC-Strat_2019
Conv_data_CAN/conv_data.cpp@30:a1e37af4bbde, 2018-04-20 (annotated)
- Committer:
- Sitkah
- Date:
- Fri Apr 20 09:16:13 2018 +0000
- Revision:
- 30:a1e37af4bbde
- Child:
- 31:833fc481b002
ne pas en prendre compte !;
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 | 30:a1e37af4bbde | 18 | } |