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.
OneWire/utils.cpp@0:55f2866e9c0c, 2014-05-27 (annotated)
- Committer:
- fblanc
- Date:
- Tue May 27 15:01:13 2014 +0000
- Revision:
- 0:55f2866e9c0c
ok
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fblanc | 0:55f2866e9c0c | 1 | #include <stdint.h> |
fblanc | 0:55f2866e9c0c | 2 | |
fblanc | 0:55f2866e9c0c | 3 | uint16_t uint8_to_uint16(uint8_t lsb, uint8_t msb) |
fblanc | 0:55f2866e9c0c | 4 | { |
fblanc | 0:55f2866e9c0c | 5 | uint16_t data; |
fblanc | 0:55f2866e9c0c | 6 | uint8_t *ptr; |
fblanc | 0:55f2866e9c0c | 7 | |
fblanc | 0:55f2866e9c0c | 8 | ptr=(uint8_t*)&data; |
fblanc | 0:55f2866e9c0c | 9 | *ptr=lsb; |
fblanc | 0:55f2866e9c0c | 10 | *++ptr=msb; |
fblanc | 0:55f2866e9c0c | 11 | return data; |
fblanc | 0:55f2866e9c0c | 12 | } |