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

Method writeUint16

modules/io/i2c/smbus.js:70–83  ·  view source on GitHub ↗
(register, word, bigEndian)

Source from the content-addressed store, hash-verified

68 }
69
70 writeUint16(register, word, bigEndian) {
71 const io = this.#io, buffer = this.#writeWordBuffer;
72
73 buffer[0] = register;
74 if (bigEndian) {
75 buffer[1] = word >> 8;
76 buffer[2] = word;
77 }
78 else {
79 buffer[1] = word;
80 buffer[2] = word >> 8;
81 }
82 io.write(buffer);
83 }
84
85 writeBuffer(register, buffer) {
86 if (ArrayBuffer.isView(buffer)) {

Callers 15

writeWordMethod · 0.95
constructorMethod · 0.45
configureMethod · 0.45
closeMethod · 0.45
sampleMethod · 0.45
#writeUint16_syncMethod · 0.45
configureMethod · 0.45
#writeWordMethod · 0.45
configureMethod · 0.45
constructorMethod · 0.45
configureMethod · 0.45
constructorMethod · 0.45

Calls 1

writeMethod · 0.65

Tested by

no test coverage detected