Merge pull request #80 from hathach/develop
added usbd_edpt_xfer/usbd_edpt_busy to replace dcd_edpt_transfer/dcd_edpt_busy()
This commit is contained in:
@@ -201,7 +201,7 @@ void hid_task(void)
|
||||
tud_hid_mouse_report(REPORT_ID_MOUSE, 0x00, delta, delta, 0, 0);
|
||||
|
||||
// delay a bit before attempt to send keyboard report
|
||||
board_delay(2);
|
||||
board_delay(10);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -62,7 +62,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef CFG_TUSB_MEM_ALIGN
|
||||
#define CFG_TUSB_MEM_ALIGN ATTR_ALIGNED(4)
|
||||
#define CFG_TUSB_MEM_ALIGN TU_ATTR_ALIGNED(4)
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
@@ -95,6 +95,9 @@
|
||||
// Should be sufficient to hold ID (if any) + Data
|
||||
#define CFG_TUD_HID_BUFSIZE 16
|
||||
|
||||
#define CFG_TUD_MIDI_RX_BUFSIZE 512
|
||||
#define CFG_TUD_MIDI_TX_BUFSIZE 512
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -62,7 +62,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef CFG_TUSB_MEM_ALIGN
|
||||
#define CFG_TUSB_MEM_ALIGN ATTR_ALIGNED(4)
|
||||
#define CFG_TUSB_MEM_ALIGN TU_ATTR_ALIGNED(4)
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@@ -34,9 +34,18 @@
|
||||
* It will receive data from Host (In endpoint) and echo back (Out endpoint).
|
||||
* HID Report descriptor use vendor for usage page (using template TUD_HID_REPORT_DESC_GENERIC_INOUT)
|
||||
*
|
||||
* Run 'python3 hid_test.py' on your PC to send and receive data to this device.
|
||||
* Python and `hid` package is required, for installation please follow
|
||||
* https://pypi.org/project/hid/
|
||||
* There are 2 ways to test the sketch
|
||||
* 1. Using nodejs
|
||||
* - Install nodejs and nmp to your PC
|
||||
* - Install execellent node-hid (https://github.com/node-hid/node-hid) by
|
||||
* $ npm install node-hid
|
||||
* - Run provided hid test script
|
||||
* $ node hid_test.js
|
||||
*
|
||||
* 2. Using python hidRun
|
||||
* - Python and `hid` package is required, for installation please follow https://pypi.org/project/hid/
|
||||
* - Run provided hid test script to send and receive data to this device.
|
||||
* $ python3 hid_test.py
|
||||
*/
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
|
@@ -62,7 +62,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef CFG_TUSB_MEM_ALIGN
|
||||
#define CFG_TUSB_MEM_ALIGN ATTR_ALIGNED(4)
|
||||
#define CFG_TUSB_MEM_ALIGN TU_ATTR_ALIGNED(4)
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@@ -62,7 +62,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef CFG_TUSB_MEM_ALIGN
|
||||
#define CFG_TUSB_MEM_ALIGN ATTR_ALIGNED(4)
|
||||
#define CFG_TUSB_MEM_ALIGN TU_ATTR_ALIGNED(4)
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@@ -63,7 +63,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef CFG_TUSB_MEM_ALIGN
|
||||
#define CFG_TUSB_MEM_ALIGN ATTR_ALIGNED(4)
|
||||
#define CFG_TUSB_MEM_ALIGN TU_ATTR_ALIGNED(4)
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@@ -14,6 +14,13 @@ CP = cp
|
||||
RM = rm
|
||||
PYTHON ?= python
|
||||
|
||||
check_defined = \
|
||||
$(strip $(foreach 1,$1, \
|
||||
$(call __check_defined,$1,$(strip $(value 2)))))
|
||||
__check_defined = \
|
||||
$(if $(value $1),, \
|
||||
$(error Undefined make flag: $1$(if $2, ($2))))
|
||||
|
||||
# Select the board to build for.
|
||||
ifeq ($(BOARD),)
|
||||
$(info You must provide a BOARD parameter with 'BOARD=')
|
||||
|
@@ -67,7 +67,7 @@
|
||||
#if CFG_TUSB_MCU == OPT_MCU_LPC175X_6X
|
||||
#define CFG_TUSB_MEM_SECTION // LPC17xx USB DMA can access all address
|
||||
#elif (CFG_TUSB_MCU == OPT_MCU_LPC43XX)
|
||||
#define CFG_TUSB_MEM_SECTION ATTR_SECTION(.data.$RAM3)
|
||||
#define CFG_TUSB_MEM_SECTION TU_ATTR_SECTION(.data.$RAM3)
|
||||
#endif
|
||||
|
||||
#elif defined __CC_ARM // Compiled with Keil armcc
|
||||
|
@@ -13,6 +13,7 @@ SRC_C += \
|
||||
src/class/msc/msc_device.c \
|
||||
src/class/cdc/cdc_device.c \
|
||||
src/class/hid/hid_device.c \
|
||||
src/class/midi/midi_device.c \
|
||||
src/tusb.c \
|
||||
src/portable/$(VENDOR)/$(CHIP_FAMILY)/dcd_$(CHIP_FAMILY).c
|
||||
|
||||
|
Reference in New Issue
Block a user