| 466 | } |
| 467 | |
| 468 | owb_status owb_write_rom_code(const OneWireBus * bus, OneWireBus_ROMCode rom_code) |
| 469 | { |
| 470 | owb_status status; |
| 471 | |
| 472 | if(!bus) |
| 473 | { |
| 474 | status = OWB_STATUS_PARAMETER_NULL; |
| 475 | } else if (!_is_init(bus)) |
| 476 | { |
| 477 | status = OWB_STATUS_NOT_INITIALIZED; |
| 478 | } else |
| 479 | { |
| 480 | owb_write_bytes(bus, (uint8_t*)&rom_code, sizeof(rom_code)); |
| 481 | status = OWB_STATUS_OK; |
| 482 | } |
| 483 | |
| 484 | return status; |
| 485 | } |
| 486 | |
| 487 | uint8_t owb_crc8_byte(uint8_t crc, uint8_t data) |
| 488 | { |
no test coverage detected