UNPKG

@iotize/ionic

Version:

Iotize specific building blocks on top of @ionic/angular.

39 lines (38 loc) 780 B
export interface PowerPin { type: 'POWER'; power: number; } export interface GPIOPin { type: 'GPIO'; num: number; } export interface GroundPin { type: 'GROUND'; } export interface DisabledPin { type: 'DISABLED'; } export type PinType = PowerPin | GPIOPin | GroundPin | DisabledPin; export interface PinEntry { num: number; pin: PinType; } export declare namespace GPIO { enum Mode { IN = "IN", OUT = "OUT" } enum Signal { HIGH = "HIGH", LOW = "LOW" } } export type PinSchema = (PinEntry & { title: string; })[]; export interface IGPIOController { conf: GPIOPin; low(): Promise<void> | void; high(): Promise<void> | void; setup(direction: GPIO.Mode, initial: GPIO.Signal): void; }