Documentation
¶
Index ¶
- Constants
- func BluetoothFindDeviceClose(hFind int) (bOk bool)
- func BluetoothFindFirstDevice(pbtsp *BLUETOOTH_DEVICE_SEARCH_PARAMS, pbtdi *BLUETOOTH_DEVICE_INFO) (hFind int)
- func BluetoothFindFirstRadio(pbtfrp *BLUETOOTH_FIND_RADIO_PARAMS, phRadio *windows.Handle) (hFind int)
- func BluetoothFindNextDevice(hFind int, pbtdi *BLUETOOTH_DEVICE_INFO) (bOK bool)
- func BluetoothFindNextRadio(hFind int, phRadio *windows.Handle) (bOK bool)
- func BluetoothFindRadioClose(hFind int) (bOK bool)
- func BluetoothGetRadioInfo(phRadio windows.Handle, pRadioInfo *BLUETOOTH_RADIO_INFO) (err error)
- func BluetoothRemoveDevice(pAddress *BLUETOOTH_ADDRESS) (err error)
- func BluetoothSetServiceState(hRadio windows.Handle, pbtdi *BLUETOOTH_DEVICE_INFO, pGuidService *GUID, ...) (err error)
- func Init() error
- type BLUETOOTH_ADDRESS
- type BLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS
- type BLUETOOTH_DEVICE_INFO
- type BLUETOOTH_DEVICE_SEARCH_PARAMS
- type BLUETOOTH_FIND_RADIO_PARAMS
- type BLUETOOTH_OOB_DATA_INFO
- type BLUETOOTH_RADIO_INFO
- type GUID
- type IrData
- type IrSens
- type RevRemote
- func (oRev *RevRemote) AsyncInitializeIRCamera(iSensitivity IrSens, iMode IrData) error
- func (oRev *RevRemote) Close()
- func (oRev *RevRemote) InterpretPackage(data []byte)
- func (oRev *RevRemote) InterpretReturn(iReport byte, iError byte) error
- func (oRev *RevRemote) PollPackage() error
- func (oRev *RevRemote) SendData(p []byte) error
- func (oRev *RevRemote) SetPlayerNumber(iPlayer uint8) error
- func (oRev *RevRemote) SetReportMode(mode uint8, continues bool) error
- func (oRev *RevRemote) SetRumble(bActive bool) error
- func (oRev *RevRemote) WriteMemory(iAddress uint32, abData []byte) error
- type RevRemoteAccelerometer
- type RevRemoteButtons
- type RevRemoteData
- type RevRemoteIRDot
- type SYSTEMTIME
Constants ¶
View Source
const ( REV_MODE_CORE_BUTTONS = 0x30 REV_MODE_CORE_BUTTONS_ACCELEROMETER = 0x31 REV_MODE_CORE_BUTTONS_8_EXTENSION = 0x32 REV_MODE_CORE_BUTTONS_ACCELEROMETER_12_IR = 0x33 REV_MODE_CORE_BUTTONS_19_EXTENSION = 0x34 REV_MODE_CORE_BUTTONS_ACCELEROMETER_16_EXTENSION = 0x35 REV_MODE_CORE_BUTTONS_10_IR_9_EXTENSION = 0x36 REV_MODE_CORE_BUTTONS_ACCELEROMETER_10_IR_6_EXTENSION = 0x37 REV_MODE_21_EXTENSION = 0x3d REV_MODE_INTERLEAVED_BUTTONS_ACCELEROMETER_36_IR_A = 0x3e REV_MODE_INTERLEAVED_BUTTONS_ACCELEROMETER_36_IR_B = 0x3f //SAME AS A. Data comes in two Reports. )
View Source
const ( IR_INIT_UNKNOWN irState = iota IR_INIT_READY IR_INIT_GOOD )
View Source
const AVOID_REMOVE_IN_MICROSECOUNDS = 5000000 //5 secounds
View Source
const BLUETOOTH_SERVICE_ENABLE = 1
View Source
const VENDOR_ID_NITENDO = 0x57e
View Source
const WII_NORMAL_NAME = "Nintendo RVL-CNT-01"
View Source
const WII_NORMAL_PID = 0x0306
View Source
const WII_PLUS_NAME = "Nintendo RVL-CNT-01-TR"
View Source
const WII_PLUS_PID = 0x0330
Variables ¶
This section is empty.
Functions ¶
func BluetoothFindFirstDevice ¶
func BluetoothFindFirstDevice(pbtsp *BLUETOOTH_DEVICE_SEARCH_PARAMS, pbtdi *BLUETOOTH_DEVICE_INFO) (hFind int)
func BluetoothFindFirstRadio ¶
func BluetoothFindFirstRadio(pbtfrp *BLUETOOTH_FIND_RADIO_PARAMS, phRadio *windows.Handle) (hFind int)
func BluetoothFindNextDevice ¶
func BluetoothFindNextDevice(hFind int, pbtdi *BLUETOOTH_DEVICE_INFO) (bOK bool)
func BluetoothFindNextRadio ¶
func BluetoothFindRadioClose ¶
func BluetoothGetRadioInfo ¶
func BluetoothGetRadioInfo(phRadio windows.Handle, pRadioInfo *BLUETOOTH_RADIO_INFO) (err error)
func BluetoothRemoveDevice ¶
func BluetoothRemoveDevice(pAddress *BLUETOOTH_ADDRESS) (err error)
Types ¶
type BLUETOOTH_ADDRESS ¶
type BLUETOOTH_ADDRESS struct {
Ulllong uint64
}
type BLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS ¶
type BLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS struct {
DeviceInfo BLUETOOTH_DEVICE_INFO
AuthenticationMethod uint32
IOCapabilities uint32
AuthenticationRequirements uint32
Passkey uint32
}
type BLUETOOTH_DEVICE_INFO ¶
type BLUETOOTH_DEVICE_INFO struct {
Address BLUETOOTH_ADDRESS
ClassOfDevice uint32
Connected int32
Remebered int32
Authenticated int32
LastSeen SYSTEMTIME
LastUsed SYSTEMTIME
// contains filtered or unexported fields
}
func InstallWiiRemotes ¶
func InstallWiiRemotes(iRadio windows.Handle) ([]*BLUETOOTH_DEVICE_INFO, error)
func (*BLUETOOTH_DEVICE_INFO) IsWiiRemote ¶
func (oDevice *BLUETOOTH_DEVICE_INFO) IsWiiRemote() bool
func (*BLUETOOTH_DEVICE_INFO) Name ¶
func (oDevice *BLUETOOTH_DEVICE_INFO) Name() string
func (*BLUETOOTH_DEVICE_INFO) ToRemote ¶
func (oDevice *BLUETOOTH_DEVICE_INFO) ToRemote() (*RevRemote, error)
type BLUETOOTH_FIND_RADIO_PARAMS ¶
type BLUETOOTH_FIND_RADIO_PARAMS struct {
// contains filtered or unexported fields
}
func MakeFindRadioParams ¶
func MakeFindRadioParams() *BLUETOOTH_FIND_RADIO_PARAMS
type BLUETOOTH_OOB_DATA_INFO ¶
type BLUETOOTH_RADIO_INFO ¶
type BLUETOOTH_RADIO_INFO struct {
Address BLUETOOTH_ADDRESS
ClassofDevice uint64
Subversion uint16
Manufacturer uint16
// contains filtered or unexported fields
}
func MakeRadioInfo ¶
func MakeRadioInfo() *BLUETOOTH_RADIO_INFO
func (*BLUETOOTH_RADIO_INFO) Name ¶
func (oRadio *BLUETOOTH_RADIO_INFO) Name() string
type RevRemote ¶
type RevRemote struct {
Device *hid.Device
Rumble bool
PlayerNr uint8
DataChannel chan *RevRemoteData
// contains filtered or unexported fields
}
func (*RevRemote) AsyncInitializeIRCamera ¶
func (*RevRemote) InterpretPackage ¶
func (*RevRemote) InterpretReturn ¶
func (*RevRemote) PollPackage ¶
func (*RevRemote) SetPlayerNumber ¶
func (*RevRemote) SetReportMode ¶
type RevRemoteAccelerometer ¶
func InterpretAccelerometer ¶
type RevRemoteButtons ¶
type RevRemoteButtons struct {
Left bool
Right bool
Down bool
Up bool
Plus bool
Two bool
One bool
B bool
A bool
Minus bool
Home bool
}
func InterpretButtons ¶
type RevRemoteData ¶
type RevRemoteData struct {
Buttons *RevRemoteButtons
Accelerometer *RevRemoteAccelerometer
IRPoints [4]*RevRemoteIRDot
}
type RevRemoteIRDot ¶
func InterpretBasicIRMode ¶
func InterpretBasicIRMode(x1, y1, m1, x2, y2, x3, y3, m2, x4, y4 byte) [4]*RevRemoteIRDot
func InterpretExtendedIRMode ¶
func InterpretExtendedIRMode(data [12]byte) [4]*RevRemoteIRDot
Click to show internal directories.
Click to hide internal directories.