#include "board.h"
#include <USBD_Config.h>
#include <USBD_LEDs.h>
#include <CDCHIDDDriver.h>
#include <CDCDSerial.h>
#include <HIDDKeyboard.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
Go to the source code of this file.
Detailed Description
This file contains all the specific code for the usb_iad_cdc_hid project
Definition in file main.c.
Define Documentation
#define DATABUFFERSIZE (DATAPACKETSIZE+2) |
Size in bytes of the buffer used for reading data from the USB & USART
Definition at line 151 of file main.c.
#define DATAPACKETSIZE CHIP_USB_ENDPOINTS_MAXPACKETSIZE(CDCDSerialDriverDescriptors_DATAIN) |
Size in bytes of the packet used for reading data from USB
Definition at line 147 of file main.c.
#define LED_NUMLOCK USBD_LEDOTHER |
NumLock LED index.
Definition at line 144 of file main.c.
Number of keys used in the example.
Definition at line 135 of file main.c.
#define NUM_MODIFIER_KEYS (NUM_KEYS - NUM_NORMAL_KEYS) |
Number of modifier keys.
Definition at line 141 of file main.c.
#define NUM_NORMAL_KEYS 1 |
Number of non-modifiers keys.
Definition at line 138 of file main.c.
Function Documentation
Buffer for storing incoming USB data. List of pinsPushButtons to configure for the application.
Definition at line 164 of file main.c.
void HIDDKeyboardCallbacks_LedsChanged |
( |
uint8_t |
numLockStatus, |
|
|
uint8_t |
capsLockStatus, |
|
|
uint8_t |
scrollLockStatus | |
|
) |
| | |
Invoked when the status of the keyboard LEDs changes. Turns the num. lock LED on or off.
- Parameters:
-
| numLockStatus | Indicates the current status of the num. lock key. |
| capsLockStatus | Indicates the current status of the caps lock key. |
| scrollLockStatus | Indicates the current status of the scroll lock key |
Definition at line 234 of file main.c.
Initializes drivers and start the USB CDCHID device.
Definition at line 364 of file main.c.
Invoked when a new SETUP request is received from the host. Forwards the request to the Mass Storage device driver handler function.
- Parameters:
-
Definition at line 206 of file main.c.
void USBDDriverCallbacks_ConfigurationChanged |
( |
uint8_t |
cfgnum |
) |
|
Invoked when the configuration of the device changes. Parse used endpoints.
- Parameters:
-
| cfgnum | New configuration number. |
Definition at line 196 of file main.c.