Functional Overview
(endpoint, data, len, tgl) TRUE if success, FALSE if the buffer is still full with the last packet.
usb_puts
(endpoint, data, len,
timeout)
usb_kbhit(endpoint)
usb_get_packet
(endpoint, ptr, max)
Sends the following data to the specified endpoint. usb_puts() differs
from usb_put_packet() in that it will send multi packet messages if the
data will not fit into one packet.
Returns TRUE if the specified endpoint has data in it's receive buffer
Reads up to max bytes from the specified endpoint buffer and saves it
to the pointer ptr. Returns the number of bytes saved to ptr.
usb_gets(endpoint, ptr, Reads a message from the specified endpoint. The difference
max, timeout)
usb_get_packet() and usb_gets() is that usb_gets() will wait until a full
message has received, which a message may contain more than one
packet. Returns the number of bytes received.
Relevant CDC
Functions:
A CDC USB device will emulate an RS-232 device, and will appear on your PC as a COM port.
The follow functions provide you this virtual RS-232/serial interface
Note: When using the CDC library, you can use the same functions above, but do not use the
packet related function such as
usb_kbhit(), usb_get_packet(), etc.
usb_cdc_kbhit()
usb_cdc_getc()
usb_cdc_putc(c)
usb_cdc_putc_fast(c)
usb_cdc_puts(*str)
usb_cdc_putready()
The same as kbhit(), returns TRUE if there is 1 or more character in the
receive buffer.
The same as getc(), reads and returns a character from the receive
buffer. If there is no data in the receive buffer it will wait indefinitely until
there a character has been received.
The same as putc(), sends a character. It actually puts a character into
the transmit buffer, and if the transmit buffer is full will wait indefinitely
until there is space for the character.
The same as usb_cdc_putc(), but will not wait indefinitely until there is
space for the character in the transmit buffer. In that situation the
character is lost.
Sends a character string (null terminated) to the USB CDC port. Will
return FALSE if the buffer is busy, TRUE if buffer is string was put into
buffer for sending. Entire string must fit into endpoint, if string is longer
than endpoint buffer then excess characters will be ignored.
Returns TRUE if there is space in the transmit buffer for another
character.
63
相关PDF资料
PCI-EXP-T42G5-N1 IP CORE PCI EXPRESS ORCA 4
PCM18XH2 PROCESSOR MODULE MPLAB-ICE 2000
PCM18XN0 PROCESSOR MODULE FOR ICE2000
PDA-B-24-615-E-2B1-1-C CIRCUIT BREAKER MAG 1P 15A
PFMF.260.2 PFMF PTC FUSE SMT 2.6A 1812
PFNF.200.2 PFNF PTC FUSE SMT 2A 1206
PFRY.375 PTC-FUSE RADIAL 72 VDC
PFSM.150.33.2 FUSE PTC 8A 15V FST-TRIP SMD
相关代理商/技术参数
PCD_09 制造商:MACOM 制造商全称:Tyco Electronics 功能描述:Low Profile PCB Relay PCD
PCD-00173-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0E 制造商:Molex 功能描述:Ethernet Cable Assembly
PCD-00173-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0K 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00174-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Red; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet ;RoHS Compliant: NA
PCD-00174-0E 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Grey; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet;RoHS Compliant: NA
PCD-00174-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY