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

Function owb_read_bytes

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

Source from the content-addressed store, hash-verified

418}
419
420owb_status owb_read_bytes(const OneWireBus * bus, uint8_t * buffer, unsigned int len)
421{
422 owb_status status;
423
424 if(!bus || !buffer)
425 {
426 status = OWB_STATUS_PARAMETER_NULL;
427 } else if (!_is_init(bus))
428 {
429 status = OWB_STATUS_NOT_INITIALIZED;
430 } else
431 {
432 for (int i = 0; i < len; ++i)
433 {
434 uint8_t out;
435 bus->driver->read_bits(bus, &out, 8);
436 buffer[i] = out;
437 }
438
439 status = OWB_STATUS_OK;
440 }
441
442 return status;
443}
444
445owb_status owb_write_bytes(const OneWireBus * bus, const uint8_t * buffer, unsigned int len)
446{

Callers 2

xs_onewire_readFunction · 0.85
owb_read_romFunction · 0.85

Calls 1

_is_initFunction · 0.85

Tested by

no test coverage detected