ibutton read with modified ds18b20 libraries
Due to the lack of programs for ibutton interfacing with mbed, i built this one (still needs a lot of development), it's in a very basic state, but i'm working on it...
ds1990.h@0:4f399e4b64a9, 2013-08-23 (annotated)
- Committer:
- Renato
- Date:
- Fri Aug 23 08:36:59 2013 +0000
- Revision:
- 0:4f399e4b64a9
Function to read ibutton serial & family
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Renato | 0:4f399e4b64a9 | 1 | #ifndef _DS1990_ |
Renato | 0:4f399e4b64a9 | 2 | #define _DS1990_ |
Renato | 0:4f399e4b64a9 | 3 | |
Renato | 0:4f399e4b64a9 | 4 | |
Renato | 0:4f399e4b64a9 | 5 | #include <stdint.h> |
Renato | 0:4f399e4b64a9 | 6 | #include "mbed.h" |
Renato | 0:4f399e4b64a9 | 7 | |
Renato | 0:4f399e4b64a9 | 8 | // Device Faimly ID and Setial number information |
Renato | 0:4f399e4b64a9 | 9 | typedef union { |
Renato | 0:4f399e4b64a9 | 10 | uint8_t rom[8]; |
Renato | 0:4f399e4b64a9 | 11 | struct { |
Renato | 0:4f399e4b64a9 | 12 | uint8_t familyCode; |
Renato | 0:4f399e4b64a9 | 13 | uint8_t serialNo[8]; |
Renato | 0:4f399e4b64a9 | 14 | uint8_t CRC; |
Renato | 0:4f399e4b64a9 | 15 | } BYTES; |
Renato | 0:4f399e4b64a9 | 16 | } ROM_Code_t; |
Renato | 0:4f399e4b64a9 | 17 | |
Renato | 0:4f399e4b64a9 | 18 | ROM_Code_t ReadROM(); |
Renato | 0:4f399e4b64a9 | 19 | |
Renato | 0:4f399e4b64a9 | 20 | #endif |