Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandHandler ¶
type CommandHandler func(data Data)
CommandHandler defines the callback function used to provide IR data received by the ReceiverDevice.
type Data ¶
type Data struct { // Code is the raw IR data received. Code uint32 // Address is the decoded address from the IR data received. Address uint16 // Command is the decoded command from the IR data recieved Command uint16 // Flags provides additional information about the IR data received. See DataFlags Flags DataFlags }
Data encapsulates the data received by the ReceiverDevice.
type DataFlags ¶
type DataFlags uint16
DataFlags provides bitwise flags representing various information about recieved IR data.
type ReceiverDevice ¶
type ReceiverDevice struct {
// contains filtered or unexported fields
}
ReceiverDevice is the device for receiving IR commands
func NewReceiver ¶
func NewReceiver(pin machine.Pin) ReceiverDevice
NewReceiver returns a new IR receiver device
func (*ReceiverDevice) Configure ¶
func (ir *ReceiverDevice) Configure()
Configure configures the input pin for the IR receiver device
func (*ReceiverDevice) SetCommandHandler ¶
func (ir *ReceiverDevice) SetCommandHandler(ch CommandHandler)
SetCommandHandler is used to start or stop receiving IR commands via a callback function (pass nil to stop)
Click to show internal directories.
Click to hide internal directories.