![]() |
Implement HID Keyboard Function For USB Device.
Implement a USB device that only have HID Keyboard Function.
COMPILER_ALIGNED | ( | 32 | ) |
HIDD Keyboard Input Report Instance Report descriptor used by the driver.
Definition at line 125 of file HIDDKeyboard.c.
uint32_t HIDDKeyboard_ChangeKeys | ( | uint8_t * | pressedKeys, | |
uint8_t | pressedKeysSize, | |||
uint8_t * | releasedKeys, | |||
uint8_t | releasedKeysSize | |||
) |
Reports a change in which keys are currently pressed or release to the host.
pressedKeys | Pointer to an array of key codes indicating keys that have been pressed since the last call to HIDDKeyboardDriver_ChangeKeys(). | |
pressedKeysSize | Number of key codes in the pressedKeys array. | |
releasedKeys | Pointer to an array of key codes indicates keys that have been released since the last call to HIDDKeyboardDriver_ChangeKeys(). | |
releasedKeysSize | Number of key codes in the releasedKeys array. |
void HIDDKeyboard_ConfigureFunction | ( | USBGenericDescriptor * | pDescriptors, | |
uint16_t | wLength | |||
) |
Configure function with expected descriptors and start functionality. Usually invoked when device is configured. Pointer to the descriptors for function configure. Length of descriptors in number of bytes.
void HIDDKeyboard_Initialize | ( | USBDDriver * | pUsbd, | |
uint8_t | bInterfaceNb | |||
) |
Initializes the HID keyboard device driver SW. (Init USBDDriver .., Init function driver .., Init USBD ...)
pUsbd | Pointer to USBDDriver instance. | |
bInterfaceNb | Interface number for the function. |
void HIDDKeyboard_RemoteWakeUp | ( | void | ) |
Starts a remote wake-up sequence if the host has explicitely enabled it by sending the appropriate SET_FEATURE request.
uint32_t HIDDKeyboard_RequestHandler | ( | const USBGenericRequest * | request | ) |
Handles HID-specific SETUP request sent by the host.
request | Pointer to a USBGenericRequest instance. |
WEAK void HIDDKeyboardCallbacks_LedsChanged | ( | uint8_t | numLockStatus, | |
uint8_t | capsLockStatus, | |||
uint8_t | scrollLockStatus | |||
) |
For HID Keyboard Function. Indicates that the status of one or more LEDs has been changed by the host.
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. |
void HIDDKeyboardDriver_ConfigurationChangedHandler | ( | uint8_t | cfgnum | ) |
Handles configureation changed event.
cfgnum | New configuration number |
void HIDDKeyboardDriver_Initialize | ( | const USBDDriverDescriptors * | pDescriptors | ) |
Initializes the HID keyboard device driver.
void HIDDKeyboardDriver_RequestHandler | ( | const USBGenericRequest * | request | ) |
Handles HID-specific SETUP request sent by the host.
request | Pointer to a USBGenericRequest instance. |
void HIDDKeyboardInputReport_Initialize | ( | HIDDKeyboardInputReport * | report | ) |
Initializes a keyboard input report instance.
report | Pointer to a HIDDKeyboardInputReport instance. |
void HIDDKeyboardInputReport_PressModifierKey | ( | HIDDKeyboardInputReport * | report, | |
uint8_t | key | |||
) |
Reports a modifier key as being currently pressed.
report | Pointer to a HIDDKeyboardInputReport instance. | |
key | Key code of the modifier key. |
void HIDDKeyboardInputReport_PressStandardKey | ( | HIDDKeyboardInputReport * | report, | |
uint8_t | key | |||
) |
Reports a standard key as being pressed.
report | Pointer to a HIDDKeyboardInputReport instance. | |
key | Key code of the standard key. |
void HIDDKeyboardInputReport_ReleaseModifierKey | ( | HIDDKeyboardInputReport * | report, | |
uint8_t | key | |||
) |
Reports a modifier key as not being pressed anymore.
report | Pointer to a HIDDKeyboardInputReport instance. | |
key | Key code of the modifier key. |
void HIDDKeyboardInputReport_ReleaseStandardKey | ( | HIDDKeyboardInputReport * | report, | |
uint8_t | key | |||
) |
Reports a standard key as not being pressed anymore.
report | Pointer to a HIDDKeyboardInputReport instance. | |
key | Key code of the standard key |
uint8_t HIDDKeyboardOutputReport_GetCapsLockStatus | ( | const HIDDKeyboardOutputReport * | report | ) |
Indicates the current status of the caps lock LED according to the given report.
report | Pointer to a HIDDKeyboardOutputReport instance. |
uint8_t HIDDKeyboardOutputReport_GetNumLockStatus | ( | const HIDDKeyboardOutputReport * | report | ) |
Indicates the current status of the num. lock LED according to the given report.
report | Pointer to a HIDDKeyboardOutputReport instance. |
uint8_t HIDDKeyboardOutputReport_GetScrollLockStatus | ( | const HIDDKeyboardOutputReport * | report | ) |
Indicates the current status of the scroll lock LED according to the given report.
report | Pointer to a HIDDKeyboardOutputReport instance. |
void HIDDKeyboardOutputReport_Initialize | ( | HIDDKeyboardOutputReport * | report | ) |
Initializes a keyboard output report.
report | Pointer to a HIDDKeyboardOutputReport instance. |
Configuration descriptors.
Definition at line 89 of file USBDDriverDescriptors.c.
Configuration descriptors.
Definition at line 89 of file USBDDriverDescriptors.c.
Configuration descriptors.
Definition at line 302 of file USBDDriverDescriptors.c.
Configuration descriptors.
Definition at line 302 of file USBDDriverDescriptors.c.
{ &deviceDescriptor, (USBConfigurationDescriptor *) &configurationDescriptors, &qualifierDescriptor, 0, 0, 0, &qualifierDescriptor, 0, stringDescriptors, 4 }
List of descriptors used by the HID keyboard driver.
Definition at line 256 of file USBDDriverDescriptors.c.
{ &usbDeviceDescriptor, (const USBConfigurationDescriptor *) &configurationDescriptorsFS, &qualifierDescriptor, 0, 0, (const USBConfigurationDescriptor *) &configurationDescriptorsHS, &qualifierDescriptor, 0, 0, 0 }
List of descriptors used by the device.
Definition at line 517 of file USBDDriverDescriptors.c.
{ &usbDeviceDescriptor, (const USBConfigurationDescriptor *) &configurationDescriptorsFS, &qualifierDescriptor, 0, 0, (const USBConfigurationDescriptor *) &configurationDescriptorsHS, &qualifierDescriptor, 0, 0, 0 }
List of descriptors used by the device.
Definition at line 517 of file USBDDriverDescriptors.c.
const USBDeviceDescriptor usbDeviceDescriptor |
{ sizeof(USBDeviceDescriptor), USBGenericDescriptor_DEVICE, USBDeviceDescriptor_USB2_00, VIDDeviceDescriptor_CLASS, VIDDeviceDescriptor_SUBCLASS, VIDDeviceDescriptor_PROTOCOL, CHIP_USB_ENDPOINTS_MAXPACKETSIZE(0), USBD_VID_ATMEL, USBD_PID_UVC, USBD_RELEASE_0_01, 0, 0, 0, 1 }
USB Device descriptor.
Definition at line 55 of file USBDDriverDescriptors.c.
const USBDeviceDescriptor usbDeviceDescriptor |
{ sizeof(USBDeviceDescriptor), USBGenericDescriptor_DEVICE, USBDeviceDescriptor_USB2_00, VIDDeviceDescriptor_CLASS, VIDDeviceDescriptor_SUBCLASS, VIDDeviceDescriptor_PROTOCOL, CHIP_USB_ENDPOINTS_MAXPACKETSIZE(0), USBD_VID_ATMEL, USBD_PID_UVC, USBD_RELEASE_0_01, 0, 0, 0, 1 }
USB Device descriptor.
Definition at line 55 of file USBDDriverDescriptors.c.