Documentation ¶
Index ¶
- Constants
- func LinuxFindDevices()
- func LinuxGetDeviceType(device_path string) (result int)
- func LinuxGetLIRCDevices() (results []string)
- type IRController
- func (irc *IRController) PressKey(key string)
- func (irc *IRController) PressKeyLinux(key_name string)
- func (irc *IRController) Receive()
- func (irc *IRController) SaveKeyFile(key string)
- func (irc *IRController) SaveKeyFileLinux(save_path string)
- func (irc *IRController) Scan()
- func (irc *IRController) ScanLinux()
- func (irc *IRController) Transmit(code string)
- func (irc *IRController) TransmitKeyFile(key string)
- func (irc *IRController) TransmitKeyFileLinux(save_path string)
- func (irc *IRController) 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 IRController ¶
type IRController 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 IRController)
2.) Get Features of USB Controller ir-ctl -f
func NewLinux ¶
func NewLinux(config *types.ConfigFile) (result IRController)
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 (*IRController) PressKey ¶
func (irc *IRController) PressKey(key string)
func (*IRController) PressKeyLinux ¶
func (irc *IRController) PressKeyLinux(key_name string)
func (*IRController) Receive ¶
func (irc *IRController) Receive()
func (*IRController) SaveKeyFile ¶
func (irc *IRController) SaveKeyFile(key string)
func (*IRController) SaveKeyFileLinux ¶
func (irc *IRController) SaveKeyFileLinux(save_path string)
ir-ctl -d /dev/lirc0 --receive=samnsung_power.key
func (*IRController) Scan ¶
func (irc *IRController) Scan()
func (*IRController) ScanLinux ¶
func (irc *IRController) ScanLinux()
func (*IRController) Transmit ¶
func (irc *IRController) Transmit(code string)
func (*IRController) TransmitKeyFile ¶
func (irc *IRController) TransmitKeyFile(key string)
func (*IRController) TransmitKeyFileLinux ¶
func (irc *IRController) TransmitKeyFileLinux(save_path string)
func (*IRController) TransmitLinux ¶
func (irc *IRController) TransmitLinux(code string)
Click to show internal directories.
Click to hide internal directories.