#include "ds18b20.h"Go to the source code of this file.
Functions | |
| void | DS18B20_Init (void) |
| Initialize DS18B20. | |
| __BIT | DS18B20_Reset (void) |
| Reset DS18B20. | |
| __BIT | DS18B20_ReadBit (void) |
| Read one bit from DS18B20. | |
| uint8_t | DS18B20_ReadByte (void) |
| Read one byte from DS18B20. | |
| void | DS18B20_WriteBit (__BIT b) |
| Write one bit to DS18B20. | |
| void | DS18B20_WriteByte (uint8_t byte) |
| Write one byte to DS18B20. | |
| void | DS18B20_ReadScratchpad (uint8_t *buf) |
| Read SRAM scratchpad. | |
| uint8_t | DS18B20_Crc (uint8_t *addr, uint8_t len) |
| 8-bit CRC calculation | |
| void | DS18B20_StartAll (void) |
| Start conversion on all slaves. | |
| __BIT | DS18B20_AllDone (void) |
| If read bit is low, then device is not finished yet with calculation temperature. | |
| void | DS18B20_ReadRom (uint8_t *buf) |
| Read 64-bit ROM: 8-bit family code "0x28", unique 48-bit serial number, 8-bit CRC. | |
| void | DS18B20_Select (const uint8_t *addr) |
| Select a slave on the bus. | |
| void | DS18B20_Start (const uint8_t *addr) |
| Start conversion on selected slave. | |
| void | DS18B20_ReadScratchpadFromAddr (const uint8_t *addr, uint8_t *buf) |
| Read SRAM scratchpad from selected slave. | |
| uint8_t | DS18B20_Search (uint8_t *buff, uint8_t *stack, uint8_t split_point) |
| Perform one ROM search. | |
| __BIT DS18B20_AllDone | ( | void | ) |
8-bit CRC calculation
| addr | |
| len |
Definition at line 151 of file ds18b20.c.
| void DS18B20_Init | ( | void | ) |
Initialize DS18B20.
Definition at line 17 of file ds18b20.c.
| __BIT DS18B20_ReadBit | ( | void | ) |
Read one bit from DS18B20.
Definition at line 49 of file ds18b20.c.
| uint8_t DS18B20_ReadByte | ( | void | ) |
| void DS18B20_ReadRom | ( | uint8_t * | buf | ) |
Read 64-bit ROM: 8-bit family code "0x28", unique 48-bit serial number, 8-bit CRC.
| buf | a 8-byte buffer |
Definition at line 189 of file ds18b20.c.
| void DS18B20_ReadScratchpad | ( | uint8_t * | buf | ) |
Read SRAM scratchpad.
| buf | a 9-byte buffer, Byte 8 contains the CRC code for bytes 0 through 7 |
Definition at line 133 of file ds18b20.c.
Read SRAM scratchpad from selected slave.
| addr | 64-bit ROM code |
| buf | a 9-byte buffer, Byte 8 contains the CRC code for bytes 0 through 7 |
Definition at line 224 of file ds18b20.c.
| __BIT DS18B20_Reset | ( | void | ) |
Reset DS18B20.
Definition at line 30 of file ds18b20.c.
Perform one ROM search.
| buff | 8-byte array for ROM bytes |
| stack | 8-byte array for search stack |
| split_point | deepest split point of last search |
Definition at line 242 of file ds18b20.c.
| void DS18B20_Select | ( | const uint8_t * | addr | ) |
Select a slave on the bus.
| addr | 64-bit ROM code |
| void DS18B20_Start | ( | const uint8_t * | addr | ) |
Start conversion on selected slave.
| addr | 64-bit ROM code |
Definition at line 214 of file ds18b20.c.
| void DS18B20_StartAll | ( | void | ) |
Start conversion on all slaves.
Definition at line 173 of file ds18b20.c.
| void DS18B20_WriteBit | ( | __BIT | b | ) |
Write one bit to DS18B20.
| b | bit value |
Definition at line 89 of file ds18b20.c.