| 443 | } |
| 444 | |
| 445 | owb_status owb_write_bytes(const OneWireBus * bus, const uint8_t * buffer, unsigned int len) |
| 446 | { |
| 447 | owb_status status; |
| 448 | |
| 449 | if(!bus || !buffer) |
| 450 | { |
| 451 | status = OWB_STATUS_PARAMETER_NULL; |
| 452 | } else if (!_is_init(bus)) |
| 453 | { |
| 454 | status = OWB_STATUS_NOT_INITIALIZED; |
| 455 | } else |
| 456 | { |
| 457 | for (int i = 0; i < len; i++) |
| 458 | { |
| 459 | bus->driver->write_bits(bus, buffer[i], 8); |
| 460 | } |
| 461 | |
| 462 | status = OWB_STATUS_OK; |
| 463 | } |
| 464 | |
| 465 | return status; |
| 466 | } |
| 467 | |
| 468 | owb_status owb_write_rom_code(const OneWireBus * bus, OneWireBus_ROMCode rom_code) |
| 469 | { |
no test coverage detected