This repository has been archived on 2022-12-29. You can view files and clone it, but cannot push or open issues or pull requests.
zeropod/@types/oled-i2c-bus.d.ts

37 lines
1.1 KiB
TypeScript

declare module 'oled-i2c-bus' {
import { I2CBus } from 'i2c-bus';
class Oled {
constructor(i2c: I2CBus, opts: OLED.Options);
clearDisplay(): void;
dimDisplay(dimming: boolean): void;
invertDisplay(invert: boolean): void;
turnOffDisplay(): void;
turnOnDisplay(): void;
drawPixel(pixels: OLED.Point[]): void;
drawLine(x0: number, y0: number, x1: number, y1: number, color: number): void;
fillRect(x0: number, y0: number, x1: number, y1: number, color: number): void;
drawBitmap(bitmap: any): void;
drawRGBAImage(image: any, x: number, y: number): void;
startScroll(direction: 'left'|'right', startRow: number, endRow: number): void;
stopScroll(): void;
setCursor(x: number, y: number): void;
writeString(font: any, size: number, text: string, color: number, wrap: boolean, sync?: boolean): void;
update(): void;
}
namespace OLED {
interface Options {
height?: number;
width?: number;
address?: number;
linespacing?: number;
letterspacing?: number;
}
type Point = [number, number, number];
}
export = Oled;
}