onewire_master.h
Go to the documentation of this file.
/* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
void onewire_master_setup(bool parasite, uint16_t recovery);
bool onewire_master_reset(void);
uint8_t onewire_master_crc(uint8_t* data, uint32_t length);
uint64_t onewire_master_rom_read(void);
bool onewire_master_rom_search(uint64_t* code, bool alarm);
bool onewire_master_rom_skip(void);
bool onewire_master_rom_match(uint64_t code);
bool onewire_master_function_read(uint8_t function, uint8_t* data, uint32_t bits);
bool onewire_master_function_write(uint8_t function, uint8_t* data, uint32_t bits);
onewire_master_rom_read
uint64_t onewire_master_rom_read(void)
send READ ROM command and read ROM code response
Definition: onewire_master.c:286
onewire_master_setup
void onewire_master_setup(bool parasite, uint16_t recovery)
setup 1-wire peripheral
Definition: onewire_master.c:73
onewire_master_reset
bool onewire_master_reset(void)
send reset pulse
Definition: onewire_master.c:116
onewire_master_rom_search
bool onewire_master_rom_search(uint64_t *code, bool alarm)
send SEARCH ROM command
Definition: onewire_master.c:305
onewire_master_function_read
bool onewire_master_function_read(uint8_t function, uint8_t *data, uint32_t bits)
issue function and read data
Definition: onewire_master.c:239
onewire_master_rom_skip
bool onewire_master_rom_skip(void)
send SKIP ROM command (all slaves on the bus will be selected)
Definition: onewire_master.c:372
onewire_master_crc
uint8_t onewire_master_crc(uint8_t *data, uint32_t length)
compute CRC for 1-Wire
Definition: onewire_master.c:219
onewire_master_rom_match
bool onewire_master_rom_match(uint64_t code)
send MATCH ROM command to select a specific slave
Definition: onewire_master.c:380
onewire_master_function_write
bool onewire_master_function_write(uint8_t function, uint8_t *data, uint32_t bits)
issue function and write data
Definition: onewire_master.c:262