Application CDC Implementation.
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | USER_SIGNATURE_USBID_POS 8 |
USBID position in user signature row. More... | |
#define | USER_SIGNATURE_USBID_SIZE 12 |
USBID size in user signature row. More... | |
Functions | |
keycode_t | cdc_getkey (void) |
Read character from CDC interface and translate to keycode. More... | |
static void | cdc_put_help (void) |
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... | |
PROGMEM_DECLARE (char const, cdc_help[]) | |
Variables | |
bool | cdc_opened = false |
uint8_t | cdc_serial_number [USB_DEVICE_GET_SERIAL_NAME_LENGTH+1] |
Serial number to be passed to USB stack. More... | |
#define USER_SIGNATURE_USBID_POS 8 |
USBID position in user signature row.
Referenced by cdc_start().
#define USER_SIGNATURE_USBID_SIZE 12 |
USBID size in user signature row.
Referenced by cdc_start().
keycode_t cdc_getkey | ( | void | ) |
Read character from CDC interface and translate to keycode.
References cdc_opened, cdc_put_help(), KEYBOARD_DOWN, KEYBOARD_NO_KEY, KEYBOARD_UP, udi_cdc_getc(), and udi_cdc_is_rx_ready().
Referenced by keyboard_get_key_state().
|
static |
References PROGMEM_PTR_T, PROGMEM_READ_BYTE, and udi_cdc_putc().
Referenced by cdc_getkey().
void cdc_set_dtr | ( | bool | enable | ) |
Called by CDC interface to open/close port communication.
enable | Open 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(), udc_start(), USER_SIGNATURE_USBID_POS, and USER_SIGNATURE_USBID_SIZE.
Referenced by main().
PROGMEM_DECLARE | ( | char | const, |
cdc_help | [] | ||
) |
Referenced by cdc_getkey(), and cdc_set_dtr().
uint8_t cdc_serial_number[USB_DEVICE_GET_SERIAL_NAME_LENGTH+1] |
Serial number to be passed to USB stack.
Referenced by cdc_start().