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

Function xs_onewire_write

modules/drivers/onewire/esp/modonewire.c:141–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void xs_onewire_write(xsMachine *the)
142{
143 modOneWire onewire = xsmcGetHostData(xsThis);
144 uint8_t value = xsmcToInteger(xsArg(0));
145 if ((value < 0) || (value > 255))
146 xsRangeError("bad value");
147 owb_write_byte(onewire->owb, value);
148}
149
150void xs_onewire_select(xsMachine *the)
151{

Callers

nothing calls this directly

Calls 1

owb_write_byteFunction · 0.85

Tested by

no test coverage detected