DefinitelyTyped/types/raspi-onewire/index.d.ts
Bryan Hughes 3524ae0be3 Adds type definitions for raspi-gpio, raspi-i2c, raspi-led, raspi-onewire, raspi-pwm, raspi-serial, raspi-soft-pwm (#22898)
* Added peripheral classes from the raspi.js suite.

* Refactored type names to match style guide
2018-01-17 07:40:29 -08:00

18 lines
872 B
TypeScript

// Type definitions for raspi-onewire 1.0
// Project: https://github.com/nebrius/raspi-onewire
// Definitions by: Bryan Hughes <https://github.com/nebrius>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
/// <reference types="node" />
import { Peripheral } from 'raspi-peripheral';
export class OneWire extends Peripheral {
private _deviceIdMapping;
constructor();
private _convertIDToMappingKey(deviceID);
private _getNameFromID(deviceID);
searchForDevices(cb: (readErr: string | Error | undefined, devices: number[][] | undefined) => void): void;
read(deviceID: number[], numBytesToRead: number, cb: (err: string | Error | undefined, data: Buffer | undefined) => void): void;
readAllAvailable(deviceID: number[], cb: (err: string | Error | undefined, data: Buffer | undefined) => void): void;
}