By this commit USB audio class implementation is introduced
to Zephyr.
The Zephyr USB audio device class follows bellow
documentations:
- Universal Serial Bus specification rev2.0 (usb20.pdf)
- Universal Serial Bus Device Class Definition for Audio Devices
(audio10.pdf)
- Universal Serial Bus Device Class Definition for Audio Data Formats
(frmts10.pdf)
- Universal Serial Bus Device Class Definition for Terminal Types
(termt10.pdf)
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
By this commit user gets possibility to register USB
device satutus callback. This callback represents device state
and is added so user could know what happend to USB device.
Callback is registered by providing it to usb_enable()
USB api is extended by this callback handler.
Samples using using USB are by default provide no callback
and the usb_enable() is called with NULL parameter.
Status callback registered by hid class is deleted as now
USB device has global callback for all classes within device.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Some of defines are present in several header files.
Those defines are the same with value but with different naming.
Common defines are brought to usb_common.h
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Several macros were documented as deprecated but lacked the
infrastructure to produce deprecation warnings. Add the deprecation
marker, and fix the in-tree references to the deprecated spellings.
Note that one non-deprecated macro should have been deprecated, and
is, referring to a newly added line control bit.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Added bBreak, bRingSignal, bFraming, bParity and bOverRun
handling in cdc_acm_line_ctrl_set.
Reference: Chapter 6.5.4 of Universal Serial Bus Communications Class
Subclass Specification for PSTN Devices rev 1.2
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Generally when DFU is in progress, the system is not expected to
be doing anything else in addition. Hence, a completion signal
would help the system to know that DFU is over and it can proceed
towards next tasks.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Added macro that generates simple report descriptor for keyboard.
Added enums for standard button codes, keyboard modifiers
and keyboard LEDs.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Add HID Device associated with the instance of the HID. This allows to
create several HID instances for multifunction composite device.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Added macro that generates simple report descriptor for mouse.
This improves the readability of hid-mouse sample.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Idle rate functionality has been implemented for HID USB class.
Bassed on Device Class Definition for Human Interface Devices 1.11.
Tested with USB3CV and host with idle rate.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Adding status callback allows to control report sending only when i.e.
device is connected or configured.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Any word started with underscore followed by and uppercase letter or a
second underscore is a reserved word according with C99.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
patch add a OUT interrupt endpoint descriptor and registers a
corresponding notification callback with usb driver, which is invoked
when data is sent to device from host.
Implement the read ready notification as suggesteed by
Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
A HID application can no longer write to the default
interrupt IN endpoint because the addresses are assigned
dynamically. Add hid_int_ep_write() function and leave
it to the hid-core to call the usb_write() with the correct
endpoint address.
fixes: #8424
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This patch lets a C++ application use more of Zephyr by adding guards
and changeing some constructs to the C++11 equivalent.
Changes include:
- Adding guards
- Switching to static_assert
- Switching to a template for ARRAY_SIZE as g++ doesn't have the
builtin.
- Re-ordering designated initialisers to match the struct field order
as G++ only supports simple designated initialisers.
Signed-off-by: Michael Hope <mlhx@google.com>
int_in_ready is an optional callback that is called when the current
interrupt IN transfer has completed. This can be used to wait for the
endpoint to go idle or to trigger the next transfer.
This is needed for protocols like FIDO U2F that use the interrupt
endpoint for transfers.
Signed-off-by: Michael Hope <mlhx@google.com>
Add Mass Storage Class header. The header is based on mass_storage.h,
has been cleaned up and extended by the Class and Protocol Codes.
mass_storage.h will be removed after mass_storage.c has been reworked.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>