Atmel Software Framework

cdc.h File Reference

Application CDC Definitions.

Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.

#include "keyboard.h"
#include "udc.h"
#include "udi_cdc.h"

Functions

static void cdc_disable (void)
 Called by CDC interface. More...
 
static bool cdc_enable (void)
 Called by CDC interface. More...
 
keycode_t cdc_getkey (void)
 Read character from CDC interface and translate to keycode. More...
 
void cdc_set_dtr (bool enable)
 Called by CDC interface to open/close port communication. More...
 
void cdc_start (void)
 Start up the needed parts for USB CDC. More...
 

Variables

uint8_t cdc_serial_number []
 Serial number to be passed to USB stack. More...
 

static void cdc_disable ( void  )
inlinestatic

Called by CDC interface.

Callback running when USB Host disable cdc interface

static bool cdc_enable ( void  )
inlinestatic

Called by CDC interface.

Callback running when USB Host enable CDC interface

Return values
trueif cdc startup is successfully done
keycode_t cdc_getkey ( void  )

Read character from CDC interface and translate to keycode.

References cdc_opened, cdc_put_help(), key, KEYBOARD_DOWN, KEYBOARD_NO_KEY, KEYBOARD_UP, udi_cdc_getc(), and udi_cdc_is_rx_ready().

Referenced by keyboard_get_key_state().

void cdc_set_dtr ( bool  enable)

Called by CDC interface to open/close port communication.

Parameters
enableOpen if true, and close if false

References cdc_opened.

void cdc_start ( void  )

Start up the needed parts for USB CDC.

References cdc_serial_number, nvm_read_user_signature_row(), temp, udc_start(), USER_SIGNATURE_USBID_POS, and USER_SIGNATURE_USBID_SIZE.

Referenced by main().

uint8_t cdc_serial_number[]

Serial number to be passed to USB stack.

Referenced by cdc_start().