Compare commits
2 Commits
47b062c08a
...
c2993a5059
Author | SHA1 | Date | |
---|---|---|---|
c2993a5059 | |||
db08c99afe |
@ -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)
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user