Compare commits

2 Commits

Author SHA1 Message Date
c2993a5059 Added some comments 2024-06-06 19:09:15 +03:00
db08c99afe Updated README 2024-06-06 19:08:42 +03:00
2 changed files with 5 additions and 4 deletions

View File

@ -31,6 +31,7 @@ Search 1-Wire devices on bus:
void app_main(void)
{
esp_log_level_set("zh_onewire", ESP_LOG_NONE);
uint8_t *rom = NULL;
zh_onewire_init(GPIO_NUM_5);
if (zh_onewire_reset() != ESP_OK)

View File

@ -15,10 +15,10 @@
#define TIME_SLOT_DURATION 120 // Time slot.
#define VALID_DATA_DURATION 15 // Valid data duration.
#define SKIP_ROM 0xCC
#define MATCH_ROM 0x55
#define READ_ROM 0x33
#define SEARCH_ROM 0xF0
#define SKIP_ROM 0xCC // Skip ROM command to address all 1-Wire devices.
#define MATCH_ROM 0x55 // Match ROM command to address a specific 1-Wire device.
#define READ_ROM 0x33 // Read ROM command for read ROM on only one 1-Wire device.
#define SEARCH_ROM 0xF0 // Read ROM on all 1-Wire devices.
#define pgm_read_byte(addr) (*(const uint8_t *)(addr))
/// \endcond