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

Method writeRegister

modules/drivers/it8951/it8951.js:280–291  ·  view source on GitHub ↗
(register, value)

Source from the content-addressed store, hash-verified

278 this.writeRegister(IT8951_LISAR, l);
279 }
280 writeRegister(register, value) {
281 this.writeCommand(IT8951_TCON_REG_WR);
282
283 this.waitBusy();
284 this.select.write(0);
285 this.spi.write16(0x0000);
286 this.waitBusy();
287 this.spi.write16(register);
288 this.waitBusy();
289 this.spi.write16(value);
290 this.select.write(1);
291 }
292 getSysInfo() {
293 this.writeCommand(IT8951_I80_CMD_GET_DEV_INFO);
294 const info = this.readWords(new Array(20));

Callers 2

constructorMethod · 0.95

Calls 4

writeCommandMethod · 0.95
waitBusyMethod · 0.95
write16Method · 0.80
writeMethod · 0.65

Tested by

no test coverage detected