28 #define ONEWIRE_MASTER_PORT C 29 #define ONEWIRE_MASTER_PIN 9 34 void onewire_master_setup(void); 121 .device =
"DS1990R/DS2401/DS2411/DS2490A",
125 .device =
"DS1991/DS1425",
129 .device =
"DS1994/DS2404",
145 .device =
"DS1982/DS2502/DS2703/DS2704",
153 .device =
"DS1985/DS2505",
161 .device =
"DS1986/DS2506",
165 .device =
"DS1920/DS18S20",
169 .device =
"DS2406/DS2407",
173 .device =
"DS1971/DS2430A",
177 .device =
"DS1954/DS1957",
181 .device =
"DS1963S/DS1962",
193 .device =
"DS28E04-100",
221 .device =
"DS1973/DS2433",
225 .device =
"DS1904/DS2415",
249 .device =
"DS1972/DS2431",
257 .device =
"DS28E01-100",
261 .device =
"DS2760/DS2761/DS2762",
273 .device =
"DS1961S/DS2432",
297 .device =
"DS1825/MAX31826/MAX31850",
305 .device =
"DS1922/DS1923/DS2422",
309 .device =
"DS28EA00",
313 .device =
"DS28EC20",
329 .device =
"DS1420/DS2490R/DS2490B",
341 .device =
"DS1982U/DS2502",
345 .device =
"DS1985U/DS2505",
349 .device =
"DS1986U/DS2506",
377 .device =
"DS2432/mTC002",
381 .device =
"BAE0910/BAE0911",
385 .device =
"Swart LCD",
bool onewire_master_write_byte(uint8_t data)
write data byte
uint64_t onewire_master_rom_read(void)
send READ ROM command and read ROM code response
bool onewire_master_reset(void)
send reset pulse
static const struct onewire_family_code_t onewire_family_codes[]
list of possible devices corresponding to the family code sources:
bool onewire_master_rom_search(uint64_t *code, bool alarm)
send SEARCH ROM command
bool onewire_master_function_read(uint8_t function, uint8_t *data, uint32_t bits)
issue function and read data
bool onewire_master_read_byte(uint8_t *data)
read data byte
bool onewire_master_rom_skip(void)
send SKIP ROM command (all slaves on the bus will be selected)
void onewire_master_release(void)
release 1-wire peripheral
const char * device
device name(s)
device corresponding to a family code
uint8_t onewire_master_crc(uint8_t *data, uint32_t length)
compute CRC for 1-Wire
bool onewire_master_rom_match(uint64_t code)
send MATCH ROM command to select a specific slave
bool onewire_master_function_write(uint8_t function, uint8_t *data, uint32_t bits)
issue function and write data