mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers: add usbdev_mock
This commit is contained in:
parent
847c2f8b6b
commit
16b5fd303b
@ -977,9 +977,11 @@ endif
|
||||
|
||||
ifneq (,$(filter usbus,$(USEMODULE)))
|
||||
DEFAULT_MODULE += auto_init_usbus
|
||||
FEATURES_REQUIRED += periph_usbdev
|
||||
USEMODULE += core_thread_flags
|
||||
USEMODULE += event
|
||||
ifeq (,$(filter usbdev_mock,$(USEMODULE)))
|
||||
FEATURES_REQUIRED += periph_usbdev
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter usbus_cdc_acm,$(USEMODULE)))
|
||||
|
@ -6,13 +6,11 @@
|
||||
* directory for more details.
|
||||
*/
|
||||
/**
|
||||
* @defgroup tests_usbdev_mock USBdev mockup device
|
||||
* @ingroup tests
|
||||
* @defgroup drivers_usbdev_mock USBdev mockup device
|
||||
* @ingroup drivers
|
||||
* @brief USBdev mockup device for testing
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
*
|
||||
* @author Koen Zandberg <koen@bergzand.net>
|
||||
*/
|
||||
|
||||
@ -115,3 +113,4 @@ void usbdev_mock_setup(usbdev_mock_esr_cb_t esr_cb,
|
||||
|
||||
#endif /* USBDEV_MOCK_H */
|
||||
/** @} */
|
||||
/** @} */
|
1
drivers/usbdev_mock/Makefile
Normal file
1
drivers/usbdev_mock/Makefile
Normal file
@ -0,0 +1 @@
|
||||
include $(RIOTBASE)/Makefile.base
|
@ -17,7 +17,6 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "embUnit.h"
|
||||
#include "periph/usbdev.h"
|
||||
#include "test_utils/expect.h"
|
||||
#include "usbdev_mock.h"
|
@ -1,7 +1,7 @@
|
||||
include ../Makefile.tests_common
|
||||
USEMODULE += embunit
|
||||
USEMODULE += usbus
|
||||
FEATURES_PROVIDED += periph_usbdev
|
||||
USEMODULE += usbdev_mock
|
||||
|
||||
DISABLE_MODULE += auto_init_usbus
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
BOARD_INSUFFICIENT_MEMORY := \
|
||||
arduino-duemilanove \
|
||||
arduino-leonardo \
|
||||
arduino-nano \
|
||||
arduino-uno \
|
||||
atmega328p \
|
||||
nucleo-f031k6 \
|
||||
stm32f030f4-demo \
|
||||
#
|
||||
|
@ -274,7 +274,7 @@ static void _handle_data(usbdev_mock_t *dev, usbdev_mock_ep_t *ep, size_t len)
|
||||
|
||||
static void _ep_esr_validation(usbdev_mock_t *dev, usbdev_mock_ep_t *ep)
|
||||
{
|
||||
DEBUG("[ep esr]: Data available for stack: %u\n", ep->available);
|
||||
DEBUG("[ep esr]: Data available for stack: %u\n", (unsigned)ep->available);
|
||||
if (req_phase == TEST_REQ_PHASE_IDLE) {
|
||||
DEBUG("[ep esr]: Done with the request\n");
|
||||
/* signal USBDEV_EVENT_ESR to call _test_sequence */
|
||||
|
Loading…
Reference in New Issue
Block a user