CDC Task
[RZRAVEN USB Stick (Jackdaw)]

Functions

void uart_usb_init (void)
 Initializes the uart_usb library.
bit uart_usb_tx_ready (void)
 This function checks if the USB emission buffer is ready to accept at at least 1 byte.
int uart_usb_putchar (int data_to_send)
 This function fills the USB transmit buffer with the new data.
bit uart_usb_test_hit (void)
 This function checks if a character has been received on the USB bus.
char uart_usb_getchar (void)
 This function reads one byte from the USB bus.
void uart_usb_flush (void)
 This function sends the data stored in the USB transmit buffer.
void menu_print (void)
 Print debug menu.
void menu_process (char c)
 Process incomming char on debug port.
 PROCESS_THREAD (cdc_process, ev, data_proc)
 Communication Data Class (CDC) Process.
void vcptx_end_led (void)
 This will enable the VCP_TRX_END LED for a period.

Variables

Uchar tx_counter
 Counter for USB Serial port.
U8 tx_counter
 Counter for USB Serial port.
uint8_t led3_timer
 Timers for LEDs.

Function Documentation

PROCESS_THREAD ( cdc_process  ,
ev  ,
data_proc   
)

Communication Data Class (CDC) Process.

This is the link between USB and the "good stuff". In this routine data is received and processed by CDC-ACM Class

Definition at line 141 of file cdc_task.c.

References CLOCK_SECOND, etimer_expired(), etimer_set(), Is_device_enumerated, led3_timer, menu_process(), PROCESS_BEGIN, PROCESS_END, PROCESS_WAIT_EVENT_UNTIL, tx_counter, uart_usb_flush(), uart_usb_getchar(), uart_usb_init(), uart_usb_test_hit(), and usb_configuration_nb.

void uart_usb_flush ( void   ) 

This function sends the data stored in the USB transmit buffer.

This function does nothing if there is no data in the buffer.

Referenced by menu_process(), and PROCESS_THREAD().

char uart_usb_getchar ( void   ) 

This function reads one byte from the USB bus.

If one byte is present in the USB fifo, this byte is returned. If no data is present in the USB fifo, this function waits for USB data.

Returns:
U8 byte received

Referenced by PROCESS_THREAD().

int uart_usb_putchar ( int  data_to_send  ) 

This function fills the USB transmit buffer with the new data.

This buffer is sent if complete. To flush this buffer before waiting full, launch the uart_usb_flush() function.

Parameters:
data_to_send Data to send
Returns:
data_to_send Data that was sent

Referenced by menu_process().

bit uart_usb_test_hit ( void   ) 

This function checks if a character has been received on the USB bus.

Returns:
bit (true if a byte is ready to be read)

Referenced by PROCESS_THREAD().

bit uart_usb_tx_ready ( void   ) 

This function checks if the USB emission buffer is ready to accept at at least 1 byte.

Return values:
TRUE if the firmware can write a new byte to transmit.
FALSE otherwise

Generated on Mon Apr 11 14:23:55 2011 for Contiki 2.5 by  doxygen 1.6.1