MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / owb_write_bytes

Function owb_write_bytes

modules/drivers/onewire/esp/owb.c:445–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443}
444
445owb_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
468owb_status owb_write_rom_code(const OneWireBus * bus, OneWireBus_ROMCode rom_code)
469{

Callers 1

owb_write_rom_codeFunction · 0.85

Calls 1

_is_initFunction · 0.85

Tested by

no test coverage detected