driver

package
v0.0.0-...-b189740 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package driver contains all code for controlling devices

Package driver contains all code for controlling devices

Index

Constants

This section is empty.

Variables

View Source
var (
	// Debug is the debug level, 0 = no output, 10 = more output
	Debug int
)

Functions

This section is empty.

Types

type KrakenDriver

type KrakenDriver struct {
	ProductID       gousb.ID
	VendorID        gousb.ID
	FirmwareVersion []int
	CoolingProfiles bool
	*gousb.Context
	*gousb.Interface
	*gousb.InEndpoint
	*gousb.OutEndpoint
}

KrakenDriver holds all driver relevant informations

func NewKrakenDriver

func NewKrakenDriver() *KrakenDriver

NewKrakenDriver creates a new USB Context instance & returns a new KrakenDriver

func (*KrakenDriver) Connect

func (d *KrakenDriver) Connect()

Connect connects to the USB device

func (*KrakenDriver) GetStatus

func (d *KrakenDriver) GetStatus() (string, uint64, uint64, string)

GetStatus reads & returns the current device status

func (*KrakenDriver) SetColor

func (d *KrakenDriver) SetColor(channel, mode string, colors []string)

SetColor sets the color of a channel & mode

func (*KrakenDriver) SetFixedSpeed

func (d *KrakenDriver) SetFixedSpeed(channel, duty string)

SetFixedSpeed checks if device supports cooling profiles and then sets the provided duty for the channel either instant or not

func (*KrakenDriver) SetSpeed

func (d *KrakenDriver) SetSpeed(channel, profile string)

SetSpeed sets a profile for a speed channel

func (*KrakenDriver) SupportsCoolingProfiles

func (d *KrakenDriver) SupportsCoolingProfiles() bool

SupportsCoolingProfiles checks if the current firmware supports cooling profiles

type SpeedProfile

type SpeedProfile [][]int

SpeedProfile represents a collection of speed profiles

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL