Options
All
  • Public
  • Public/Protected
  • All
Menu

gca-js

Index

Functions

getAdaptersList

  • getAdaptersList(): Promise<USBDevice[]>
  • Gets all the Nintendo® Wii U/Switch USB GameCube™ Adapters that are connected in your computer.

    Returns Promise<USBDevice[]>

    An array with all the detected adapters

readData

  • readData(adapter: USBDevice): Promise<Buffer>
  • Reads the current state of the adapter.

    Parameters

    • adapter: USBDevice

      The adapter to read data from.

    Returns Promise<Buffer>

    A 37 bytes long Buffer containing the data read from the adapter.

sendRumble

  • sendRumble(adapter: USBDevice, rumble: [boolean, boolean, boolean, boolean]): Promise<void>
  • Sends a command to the adapter to set the rumbling state of the controller.

    It can be set to either rumbling or not rumbling. Once it is sent, it will remain in that state until the next rumble command is sent.

    Parameters

    • adapter: USBDevice

      The adapter to send the command to.

    • rumble: [boolean, boolean, boolean, boolean]

      An array of 4 booleans, one for each controller port.

    Returns Promise<void>

startAdapter

  • startAdapter(adapter: USBDevice): Promise<void>
  • Sets up the adapter for use. Internally, it claims the interface and sends a command to enable data transfering to it.

    Parameters

    • adapter: USBDevice

      The adapter to setup.

    Returns Promise<void>

stopAdapter

  • stopAdapter(adapter: USBDevice): Promise<void>
  • Sends a command to stop communication with the adapter and disable it.

    This is only necessary in cases whenever cleanup is not done properly.

    Parameters

    • adapter: USBDevice

      The adapter to stop communicating with.

    Returns Promise<void>

Object literals

Const ENDPOINTS

ENDPOINTS: object

IN

IN: number = 129

OUT

OUT: number = 2

Generated using TypeDoc