![](/media/cache/profiles/cff02a74da64d145a4aed3a577a106ab.jpg.50x50_q85.jpg)
test MAX31850
OneWire/utils.cpp@3:b4277f7c538e, 2014-06-02 (annotated)
- Committer:
- fblanc
- Date:
- Mon Jun 02 13:17:18 2014 +0000
- Revision:
- 3:b4277f7c538e
- Parent:
- 0:55f2866e9c0c
ok tk.ini
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 | } |