()
| 151 | io.writeUint16(Register.TMP117_CONF, conf, true); |
| 152 | } |
| 153 | close() { |
| 154 | if ("ready" === this.#status) { |
| 155 | const io = this.#io; |
| 156 | let conf = io.readUint16(Register.TMP117_CONF, true); |
| 157 | conf &= ~ConfigMask.MODE; |
| 158 | conf |= SHUTDOWN_MODE; |
| 159 | io.writeUint16(Register.TMP117_CONF, conf, true); |
| 160 | this.#status = undefined; |
| 161 | } |
| 162 | this.#monitor?.close(); |
| 163 | this.#monitor = undefined; |
| 164 | this.#io.close(); |
| 165 | this.#io = undefined; |
| 166 | } |
| 167 | #twoC16(val) { |
| 168 | return (val > 32768) ? -(65535 - val + 1) : val; |
| 169 | } |
nothing calls this directly
no test coverage detected