Documentation ¶
Index ¶
- Constants
- func LinuxFindDevices()
- func LinuxGetDeviceType(device_path string) (result int)
- func LinuxGetLIRCDevices() (results []string)
- type Controller
- func (irc *Controller) PressKey(key string)
- func (irc *Controller) PressKeyLinux(key_name string)
- func (irc *Controller) Receive()
- func (irc *Controller) SaveKeyFile(key string)
- func (irc *Controller) SaveKeyFileLinux(save_path string)
- func (irc *Controller) Scan()
- func (irc *Controller) ScanLinux()
- func (irc *Controller) Transmit(code string)
- func (irc *Controller) TransmitKeyFile(key string)
- func (irc *Controller) TransmitKeyFileLinux(save_path string)
- func (irc *Controller) TransmitLinux(code string)
- type USBDevice
Constants ¶
View Source
const RECEIVE_ONLY = 3
View Source
const TRANSMIT_AND_RECEIVE = 1
View Source
const TRANSMIT_ONLY = 2
Variables ¶
This section is empty.
Functions ¶
func LinuxFindDevices ¶
func LinuxFindDevices()
func LinuxGetDeviceType ¶
func LinuxGetLIRCDevices ¶
func LinuxGetLIRCDevices() (results []string)
Types ¶
type Controller ¶ added in v1.0.7
type Controller struct { Config *types.ConfigFile `yaml:"-"` Remote string `yaml:"remote"` DevicePaths []string `yaml:"device_paths"` DevicePath string `yaml:"device_path"` DeviceType int `yaml:"device_type"` }
func New ¶
func New(config *types.ConfigFile) (result Controller)
2.) Get Features of USB Controller ir-ctl -f
func NewLinux ¶
func NewLinux(config *types.ConfigFile) (result Controller)
https://github.com/google/gousb/tree/master?tab=readme-ov-file https://github.com/libusb/libusb/wiki sudo apt-get install libusb-1.0-0-dev -y https://pkg.go.dev/github.com/google/gousb#DeviceDesc
func (*Controller) PressKey ¶ added in v1.0.7
func (irc *Controller) PressKey(key string)
func (*Controller) PressKeyLinux ¶ added in v1.0.7
func (irc *Controller) PressKeyLinux(key_name string)
func (*Controller) Receive ¶ added in v1.0.7
func (irc *Controller) Receive()
func (*Controller) SaveKeyFile ¶ added in v1.0.7
func (irc *Controller) SaveKeyFile(key string)
func (*Controller) SaveKeyFileLinux ¶ added in v1.0.7
func (irc *Controller) SaveKeyFileLinux(save_path string)
ir-ctl -d /dev/lirc0 --receive=samnsung_power.key
func (*Controller) Scan ¶ added in v1.0.7
func (irc *Controller) Scan()
func (*Controller) ScanLinux ¶ added in v1.0.7
func (irc *Controller) ScanLinux()
func (*Controller) Transmit ¶ added in v1.0.7
func (irc *Controller) Transmit(code string)
func (*Controller) TransmitKeyFile ¶ added in v1.0.7
func (irc *Controller) TransmitKeyFile(key string)
func (*Controller) TransmitKeyFileLinux ¶ added in v1.0.7
func (irc *Controller) TransmitKeyFileLinux(save_path string)
func (*Controller) TransmitLinux ¶ added in v1.0.7
func (irc *Controller) TransmitLinux(code string)
Click to show internal directories.
Click to hide internal directories.