Specifications
V850E2/MN4 USB CDC (Communication Device Class) Driver
R01AN0010EJ0101 Rev.1.01 Page 29 of 117
Feb 01, 2012
4.3 Function Specifications
This section describes the functions that are implemented in the sample driver.
4.3.1 List of Functions
Table 4.9 shows a list of functions that are implemented in the source files for the sample driver.
Table 4.9 Sample Driver Functions
Source File Function Name Description
main.c main Main routine
cpu_init Initializes the CPU.
SetProtectReg
Processes access to a write-protected
register.
usbf850.c usbf850_init Initializes the USB function controller.
usbf850_intusbf0
Monitors Endpoint0 and controls
responses to requests.
usbf850_intusbf1 Processes resume interrupts.
usbf850_data_send Sends USB data.
usbf850_data_receive Receives USB data.
usbf850_rdata_length Gets USB receive data length.
usbf850_send_EP0 Sends at Endpoint0.
usbf850_receive_EP0 Receives at Endpoint0.
usbf850_send_null
Sends Null packets to Bulk/ Interrupt In
Endpoint.
usbf850_sendnullEP0 Sends out NULL packet for Endpoint0.
usbf850_sendstallEP0 Returns STALL for Endpoint0.
usbf850_ep_status
Notifies FIFO state of Bulk/ Interrupt In
Endpoint.
usbf850_fifo_clear
Clears FIFOs for endpoints other than
Endpoint0.
usbf850_standardreq Processes a standard request.
usbf850_getdesc
Processes a GET_DESCRIPTOR
request.
usbf850_communication.c usbf850_classreq Processes a CDC class request.
usbf850_send_encapsulated_command
Processes a Send Encapsulated
Command request.
usbf850_get_encapsulated_response
Processes a Get Encapsulated
Command request.
usbf850_set_line_coding Processes a Set Line Coding request.
usbf850_get_line_coding Processes a Get Line Coding request.
usbf850_set_control_line_state
Processes a Set Control Line State
request.
usbf850_buff_init
FIFO clear processing for the endpoint
used for CDC data transmission
usbf850_get_bufinit_flg
Execution state notification processing
for FIFO initialization
usbf850_send_buf CDC data send processing
usbf850_recv_buf
CDC class request processing function
registration