forked from noble/node-bluetooth-hci-socket
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Licence Indentifier
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// SPDX-Licence-Indentifier: MIT | ||
// By: Yusuf Can INCE <[email protected]> | ||
|
||
/// <reference types="node" /> | ||
|
||
interface Device { | ||
devId: number | null; | ||
devUp: boolean | null; | ||
/** USB-IF vendor ID. */ | ||
idVendor: number | null; | ||
/** USB-IF product ID. */ | ||
idProduct: number | null; | ||
/** Integer USB device number */ | ||
busNumber: number | null; | ||
/** Integer USB device address */ | ||
deviceAddress: number | null; | ||
} | ||
|
||
declare class BluetoothHciSocket extends NodeJS.EventEmitter { | ||
getDeviceList(): Device[]; | ||
isDevUp(): boolean; | ||
|
||
start(): void; | ||
stop(): void; | ||
reset(): void; | ||
|
||
bindRaw(devId: number): number; | ||
bindUser(devId: number): number; | ||
bindControl(): number; | ||
|
||
setFilter(filter: Buffer): void; | ||
write(data: Buffer): void; | ||
|
||
on(event: "data", cb: (data: Buffer) => void): this; | ||
on(event: "error", cb: (error: NodeJS.ErrnoException) => void): this; | ||
} | ||
|
||
export = BluetoothHciSocket; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters