Documentation ¶
Index ¶
Constants ¶
const (
VendorId = 0x0fd9
)
Variables ¶
var ( APIv1 = APIspec{ // contains filtered or unexported fields } APIv2 = APIspec{ // contains filtered or unexported fields } )
var ( Original = DeviceType{ APIspec: APIv1, PacketLength: 8191, ProductName: "Streamdeck", Columns: 5, Rows: 3, IconSize: 72, // contains filtered or unexported fields } OriginalV2 = DeviceType{ APIspec: APIv2, PacketLength: 1024, ProductName: "Streamdeck", Columns: 5, Rows: 3, IconSize: 72, // contains filtered or unexported fields } OriginalMk2 = DeviceType{ APIspec: APIv2, PacketLength: 1024, ProductName: "Streamdeck Mk2", Columns: 5, Rows: 3, IconSize: 72, // contains filtered or unexported fields } XL = DeviceType{ APIspec: APIv2, PacketLength: 1024, ProductName: "Streamdeck XL", Columns: 8, Rows: 4, IconSize: 96, // contains filtered or unexported fields } Mini = DeviceType{ APIspec: APIv1, PacketLength: 1024, ProductName: "Streamdeck Mini", Columns: 3, Rows: 2, IconSize: 80, // contains filtered or unexported fields } MiniV2 = DeviceType{ APIspec: APIv1, PacketLength: 1024, ProductName: "Streamdeck Mini", Columns: 3, Rows: 2, IconSize: 80, // contains filtered or unexported fields } )
var DeviceFunc func() []HIDDevice = func() []HIDDevice { log.Fatal("DeviceFunc is not set for this platform") return nil }
DeviceFunc is any function that returns a slice of devices that satisfy HIDDevice interface. Any custom wrapper should set this function to a compatible function before calling .Devices() Devices should be returned in closed state.
Functions ¶
This section is empty.
Types ¶
type ButtonEvent ¶
ButtonEvent holds information about which button state changed and if the button was pressed down (true) or if it released (false).
type Device ¶
type Device struct { HIDDevice DeviceType }
Device represents single Elgato Streamdeck device
device.Open() should be called before attempting to use the device and device.Close() after device is no longer being used.
func Devices ¶
func Devices() (devices []Device)
Devices returns slice of supported Elgato Streamdeck devices. device.Open() should be called before attempting to use the device
func (Device) Brightness ¶
Brightness sets the brightness level (between 0 and 100) of the device. Setting brightness to 0 shuts down the display.
func (Device) Events ¶
func (d Device) Events() <-chan ButtonEvent
Events returns a channel that forwards button press events from the device. Channel will close itself when device.Close() is called.
Listener should drain the channel before shutting down.