Usb_read, Usb_write – Argox PA-20 Programming Guide User Manual

Page 95

Advertising
background image

PT-20 Programming Guide

93

USB_Read

Purpose: Read specific number of bytes from USB port.

Syntax: int USBRead(unsigned char *rbuf, unsigned int rLength);

Example call: int k;

unsigned char ausBuf[12];

k = USBRead(ausBuf, 10);

_printf("Read %d characters => %s", k, ausBuf);

Includes:

#include “SDK.h ”

Description: The function can write specific number of bytes from USB port.

Returns: The USBRead function returns the number characters from the PC site

USB_Write

Purpose: Write specific number of bytes to USB port.

Syntax: void USBWrite(unsigned char *wbuf, unsigned int wLength);

Example call: USBWrite("0123456789", 10);

Includes:

#include “SDK.h ”

Description: The function can write specific number of bytes to USB port.

Returns: None

Advertising