Innovate-motorsports OT-2 SDK Manual do Utilizador Página 65

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 76
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 64
65
The interface is byte oriented, and only involves a few calls:
Discovery
BOOL imsusbCanConnect(BOOL *inuse); // OUT: indicates if the reason for
// failure is that the device is in
// use
Check if a device is available.
Returns: TRUE if a USB device can be connected to, FALSE if not. If the result is
FALSE, inuse can be used to determine if there is no device present, or if a device is
present but currently in use.
Open/Close
BOOL imsusbConnect();
Connect to the IMS USB Device.
Returns: TRUE if successful, FALSE on failure.
void imsusbClose();
Release the previously connected IMS USB device.
Receive Data
BOOL imsusbIsByte();
Check if a byte is ready to be received.
Returns: TRUE if a data byte is ready, FALSE if no data is ready.
BYTE imsusbGetByte();
Read a byte from device.
Returns: byte read from USB, will block until a byte is received. If USB terminates
abnormally, returns 0.
int imsusbGetBytes(int len, // Number of bytes to read
BYTE *data) // OUT: buffer for read data
Read multiple bytes from USB.
Returns: Number of bytes read or -1 for error.
Send Data
BOOL imsusbPutByte(BYTE b);
Vista de página 64
1 2 ... 60 61 62 63 64 65 66 67 68 69 70 ... 75 76

Comentários a estes Manuais

Sem comentários