mirror of
https://github.com/chirimen-oh/node-web-i2c.git
synced 2025-04-01 19:05:19 +00:00
レビュー指摘事項反映
This commit is contained in:
parent
351cd84f8d
commit
7ecc70725e
1 changed files with 18 additions and 18 deletions
36
index.ts
36
index.ts
|
@ -105,7 +105,7 @@ export class I2CPort {
|
|||
slaveAddress,
|
||||
/**
|
||||
* @function
|
||||
* I2c s/I2c/I2C 読み取り処理
|
||||
* I2C 読み取り処理
|
||||
* @param registerNumber 読み取りアドレス
|
||||
*/
|
||||
read8: (registerNumber) =>
|
||||
|
@ -114,7 +114,7 @@ export class I2CPort {
|
|||
}),
|
||||
/**
|
||||
* @function
|
||||
* I2c s/I2c/I2C 読み取り処理
|
||||
* I2C 読み取り処理
|
||||
* @param registerNumber 読み取りアドレス
|
||||
*/
|
||||
read16: (registerNumber) =>
|
||||
|
@ -137,7 +137,7 @@ export class I2CPort {
|
|||
},
|
||||
/**
|
||||
* @function
|
||||
* I2c s/byte/bytes 書き込み処理
|
||||
* I2c bytes 書き込み処理
|
||||
* @param registerNumber 書き込みアドレス
|
||||
* @param word 書き込みの値(ワード)
|
||||
*/
|
||||
|
@ -151,7 +151,7 @@ export class I2CPort {
|
|||
},
|
||||
/**
|
||||
* @function
|
||||
* I2c s/byte/bytes 読み取りバイト処理
|
||||
* I2c bytes 読み取りバイト処理
|
||||
* Different from Web I2C API specification.
|
||||
*/
|
||||
readByte: async () => {
|
||||
|
@ -164,7 +164,7 @@ export class I2CPort {
|
|||
},
|
||||
/**
|
||||
* @function
|
||||
* I2c s/byte/bytes 読み取りバイト処理
|
||||
* I2c bytes 読み取りバイト処理
|
||||
* Different from Web I2C API specification.
|
||||
* @param length 読み取る配列の長さ
|
||||
*/
|
||||
|
@ -182,9 +182,9 @@ export class I2CPort {
|
|||
},
|
||||
/**
|
||||
* @function
|
||||
* I2c s/byte/bytes 書き込みバイト処理
|
||||
* I2c bytes 書き込みバイト処理
|
||||
* Different from Web I2C API specification.
|
||||
* @param registerNumber 読み取りアドレス
|
||||
* @param byte 書き込みの値
|
||||
*/
|
||||
writeByte: async (byte) => {
|
||||
try {
|
||||
|
@ -196,7 +196,7 @@ export class I2CPort {
|
|||
},
|
||||
/**
|
||||
* @function
|
||||
* I2c s/byte/bytes 書き込み処理
|
||||
* I2c bytes 書き込み処理
|
||||
* Different from Web I2C API specification.
|
||||
* @param 書き込みの値の配列
|
||||
*/
|
||||
|
@ -225,13 +225,13 @@ export interface I2CSlaveDevice {
|
|||
|
||||
/**
|
||||
* @function
|
||||
* I2c s/I2c/I2C 読み取り処理
|
||||
* I2C 読み取り処理
|
||||
* @param registerNumber 読み取りアドレス
|
||||
*/
|
||||
read8(registerNumber: number): Promise<number>;
|
||||
/**
|
||||
* @function
|
||||
* I2c s/I2c/I2C 読み取り処理
|
||||
* I2C 読み取り処理
|
||||
* @param registerNumber 読み取りアドレス
|
||||
*/
|
||||
read16(registerNumber: number): Promise<number>;
|
||||
|
@ -239,42 +239,42 @@ export interface I2CSlaveDevice {
|
|||
* @function
|
||||
* I2c s/I2c/I2C 書き込み処理
|
||||
* @param registerNumber 書き込みアドレス
|
||||
* @param byte 書き込みの値(バイト)
|
||||
* @param value 書き込みの値(バイト)
|
||||
*/
|
||||
write8(registerNumber: number, value: number): Promise<number>;
|
||||
/**
|
||||
* @function
|
||||
* I2c s/byte/bytes 書き込み処理
|
||||
* I2c bytes 書き込み処理
|
||||
* @param registerNumber 書き込みアドレス
|
||||
* @param word 書き込みの値(ワード)
|
||||
* @param value 書き込みの値(ワード)
|
||||
*/
|
||||
write16(registerNumber: number, value: number): Promise<number>;
|
||||
|
||||
/**
|
||||
* @function
|
||||
* I2c s/byte/bytes 読み取りバイト処理
|
||||
* I2c bytes 読み取りバイト処理
|
||||
* Different from Web I2C API specification.
|
||||
*/
|
||||
readByte(): Promise<number>;
|
||||
/**
|
||||
* @function
|
||||
* I2c s/byte/bytes 読み取りバイト処理
|
||||
* I2c bytes 読み取りバイト処理
|
||||
* Different from Web I2C API specification.
|
||||
* @param length 読み取る配列の長さ
|
||||
*/
|
||||
readBytes(length: number): Promise<Uint8Array>;
|
||||
/**
|
||||
* @function
|
||||
* I2c s/byte/bytes 書き込みバイト処理
|
||||
* I2c bytes 書き込みバイト処理
|
||||
* Different from Web I2C API specification.
|
||||
* @param byte 書き込みの値
|
||||
*/
|
||||
writeByte(byte: number): Promise<number>;
|
||||
/**
|
||||
* @function
|
||||
* I2c s/byte/bytes 書き込みバイト配列処理
|
||||
* I2c bytes 書き込みバイト配列処理
|
||||
* Different from Web I2C API specification.
|
||||
* @param byte 書き込みの値
|
||||
* @param bytes 書き込みの値
|
||||
*/
|
||||
writeBytes(bytes: Array<number>): Promise<Uint8Array>;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue