mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
Fix typo of CFG_TUD_ENDOINT0_SIZE.
This commit is contained in:
parent
01b4115b0b
commit
c4483d244b
@ -64,7 +64,7 @@
|
|||||||
// DEVICE CONFIGURATION
|
// DEVICE CONFIGURATION
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
#define CFG_TUD_ENDOINT0_SIZE 64
|
#define CFG_TUD_ENDPOINT0_SIZE 64
|
||||||
|
|
||||||
//------------- CLASS -------------//
|
//------------- CLASS -------------//
|
||||||
#define CFG_TUD_CDC 0
|
#define CFG_TUD_CDC 0
|
||||||
|
@ -68,8 +68,8 @@
|
|||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// DEVICE CONFIGURATION
|
// DEVICE CONFIGURATION
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
#ifndef CFG_TUD_ENDOINT0_SIZE
|
#ifndef CFG_TUD_ENDPOINT0_SIZE
|
||||||
#define CFG_TUD_ENDOINT0_SIZE 64
|
#define CFG_TUD_ENDPOINT0_SIZE 64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//------------- CLASS -------------//
|
//------------- CLASS -------------//
|
||||||
|
@ -50,7 +50,7 @@ tusb_desc_device_t const desc_device =
|
|||||||
.bDeviceSubClass = MISC_SUBCLASS_COMMON,
|
.bDeviceSubClass = MISC_SUBCLASS_COMMON,
|
||||||
.bDeviceProtocol = MISC_PROTOCOL_IAD,
|
.bDeviceProtocol = MISC_PROTOCOL_IAD,
|
||||||
|
|
||||||
.bMaxPacketSize0 = CFG_TUD_ENDOINT0_SIZE,
|
.bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE,
|
||||||
|
|
||||||
.idVendor = 0xCafe,
|
.idVendor = 0xCafe,
|
||||||
.idProduct = USB_PID,
|
.idProduct = USB_PID,
|
||||||
|
@ -69,8 +69,8 @@
|
|||||||
// DEVICE CONFIGURATION
|
// DEVICE CONFIGURATION
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef CFG_TUD_ENDOINT0_SIZE
|
#ifndef CFG_TUD_ENDPOINT0_SIZE
|
||||||
#define CFG_TUD_ENDOINT0_SIZE 64
|
#define CFG_TUD_ENDPOINT0_SIZE 64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//------------- CLASS -------------//
|
//------------- CLASS -------------//
|
||||||
|
@ -57,7 +57,7 @@ tusb_desc_device_t const desc_device =
|
|||||||
.bDeviceProtocol = 0x00,
|
.bDeviceProtocol = 0x00,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.bMaxPacketSize0 = CFG_TUD_ENDOINT0_SIZE,
|
.bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE,
|
||||||
|
|
||||||
.idVendor = 0xCafe,
|
.idVendor = 0xCafe,
|
||||||
.idProduct = USB_PID,
|
.idProduct = USB_PID,
|
||||||
|
@ -69,8 +69,8 @@
|
|||||||
// DEVICE CONFIGURATION
|
// DEVICE CONFIGURATION
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef CFG_TUD_ENDOINT0_SIZE
|
#ifndef CFG_TUD_ENDPOINT0_SIZE
|
||||||
#define CFG_TUD_ENDOINT0_SIZE 64
|
#define CFG_TUD_ENDPOINT0_SIZE 64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//------------- CLASS -------------//
|
//------------- CLASS -------------//
|
||||||
|
@ -47,7 +47,7 @@ tusb_desc_device_t const desc_device =
|
|||||||
.bDeviceClass = 0x00,
|
.bDeviceClass = 0x00,
|
||||||
.bDeviceSubClass = 0x00,
|
.bDeviceSubClass = 0x00,
|
||||||
.bDeviceProtocol = 0x00,
|
.bDeviceProtocol = 0x00,
|
||||||
.bMaxPacketSize0 = CFG_TUD_ENDOINT0_SIZE,
|
.bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE,
|
||||||
|
|
||||||
.idVendor = 0xCafe,
|
.idVendor = 0xCafe,
|
||||||
.idProduct = USB_PID,
|
.idProduct = USB_PID,
|
||||||
|
@ -69,8 +69,8 @@
|
|||||||
// DEVICE CONFIGURATION
|
// DEVICE CONFIGURATION
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef CFG_TUD_ENDOINT0_SIZE
|
#ifndef CFG_TUD_ENDPOINT0_SIZE
|
||||||
#define CFG_TUD_ENDOINT0_SIZE 64
|
#define CFG_TUD_ENDPOINT0_SIZE 64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//------------- CLASS -------------//
|
//------------- CLASS -------------//
|
||||||
|
@ -46,7 +46,7 @@ tusb_desc_device_t const desc_device =
|
|||||||
.bDeviceClass = 0x00,
|
.bDeviceClass = 0x00,
|
||||||
.bDeviceSubClass = 0x00,
|
.bDeviceSubClass = 0x00,
|
||||||
.bDeviceProtocol = 0x00,
|
.bDeviceProtocol = 0x00,
|
||||||
.bMaxPacketSize0 = CFG_TUD_ENDOINT0_SIZE,
|
.bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE,
|
||||||
|
|
||||||
.idVendor = 0xCafe,
|
.idVendor = 0xCafe,
|
||||||
.idProduct = USB_PID,
|
.idProduct = USB_PID,
|
||||||
|
@ -69,8 +69,8 @@
|
|||||||
// DEVICE CONFIGURATION
|
// DEVICE CONFIGURATION
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef CFG_TUD_ENDOINT0_SIZE
|
#ifndef CFG_TUD_ENDPOINT0_SIZE
|
||||||
#define CFG_TUD_ENDOINT0_SIZE 64
|
#define CFG_TUD_ENDPOINT0_SIZE 64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//------------- CLASS -------------//
|
//------------- CLASS -------------//
|
||||||
|
@ -46,7 +46,7 @@ tusb_desc_device_t const desc_device =
|
|||||||
.bDeviceClass = 0x00,
|
.bDeviceClass = 0x00,
|
||||||
.bDeviceSubClass = 0x00,
|
.bDeviceSubClass = 0x00,
|
||||||
.bDeviceProtocol = 0x00,
|
.bDeviceProtocol = 0x00,
|
||||||
.bMaxPacketSize0 = CFG_TUD_ENDOINT0_SIZE,
|
.bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE,
|
||||||
|
|
||||||
.idVendor = 0xCafe,
|
.idVendor = 0xCafe,
|
||||||
.idProduct = USB_PID,
|
.idProduct = USB_PID,
|
||||||
|
@ -69,8 +69,8 @@
|
|||||||
// DEVICE CONFIGURATION
|
// DEVICE CONFIGURATION
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef CFG_TUD_ENDOINT0_SIZE
|
#ifndef CFG_TUD_ENDPOINT0_SIZE
|
||||||
#define CFG_TUD_ENDOINT0_SIZE 64
|
#define CFG_TUD_ENDPOINT0_SIZE 64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//------------- CLASS -------------//
|
//------------- CLASS -------------//
|
||||||
|
@ -46,7 +46,7 @@ tusb_desc_device_t const desc_device =
|
|||||||
.bDeviceClass = 0x00,
|
.bDeviceClass = 0x00,
|
||||||
.bDeviceSubClass = 0x00,
|
.bDeviceSubClass = 0x00,
|
||||||
.bDeviceProtocol = 0x00,
|
.bDeviceProtocol = 0x00,
|
||||||
.bMaxPacketSize0 = CFG_TUD_ENDOINT0_SIZE,
|
.bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE,
|
||||||
|
|
||||||
.idVendor = 0xCafe,
|
.idVendor = 0xCafe,
|
||||||
.idProduct = USB_PID,
|
.idProduct = USB_PID,
|
||||||
|
@ -69,8 +69,8 @@
|
|||||||
// DEVICE CONFIGURATION
|
// DEVICE CONFIGURATION
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef CFG_TUD_ENDOINT0_SIZE
|
#ifndef CFG_TUD_ENDPOINT0_SIZE
|
||||||
#define CFG_TUD_ENDOINT0_SIZE 64
|
#define CFG_TUD_ENDPOINT0_SIZE 64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//------------- CLASS -------------//
|
//------------- CLASS -------------//
|
||||||
|
@ -50,7 +50,7 @@ tusb_desc_device_t const desc_device =
|
|||||||
.bDeviceClass = TUSB_CLASS_MISC,
|
.bDeviceClass = TUSB_CLASS_MISC,
|
||||||
.bDeviceSubClass = MISC_SUBCLASS_COMMON,
|
.bDeviceSubClass = MISC_SUBCLASS_COMMON,
|
||||||
.bDeviceProtocol = MISC_PROTOCOL_IAD,
|
.bDeviceProtocol = MISC_PROTOCOL_IAD,
|
||||||
.bMaxPacketSize0 = CFG_TUD_ENDOINT0_SIZE,
|
.bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE,
|
||||||
|
|
||||||
.idVendor = 0xCafe,
|
.idVendor = 0xCafe,
|
||||||
.idProduct = USB_PID,
|
.idProduct = USB_PID,
|
||||||
|
@ -2,7 +2,7 @@ CFLAGS += \
|
|||||||
-D__MSP430F5529__ \
|
-D__MSP430F5529__ \
|
||||||
-DCFG_TUSB_MCU=OPT_MCU_MSP430x5xx \
|
-DCFG_TUSB_MCU=OPT_MCU_MSP430x5xx \
|
||||||
-DCFG_EXAMPLE_MSC_READONLY \
|
-DCFG_EXAMPLE_MSC_READONLY \
|
||||||
-DCFG_TUD_ENDOINT0_SIZE=8
|
-DCFG_TUD_ENDPOINT0_SIZE=8
|
||||||
|
|
||||||
# All source paths should be relative to the top level.
|
# All source paths should be relative to the top level.
|
||||||
LD_FILE = hw/bsp/msp_exp430f5529lp/msp430f5529.ld
|
LD_FILE = hw/bsp/msp_exp430f5529lp/msp430f5529.ld
|
||||||
|
@ -124,7 +124,7 @@ bool usbd_control_xfer_cb (uint8_t rhport, uint8_t ep_addr, xfer_result_t result
|
|||||||
_control_state.total_transferred += xferred_bytes;
|
_control_state.total_transferred += xferred_bytes;
|
||||||
_control_state.buffer += xferred_bytes;
|
_control_state.buffer += xferred_bytes;
|
||||||
|
|
||||||
if ( _control_state.total_len == _control_state.total_transferred || xferred_bytes < CFG_TUD_ENDOINT0_SIZE )
|
if ( _control_state.total_len == _control_state.total_transferred || xferred_bytes < CFG_TUD_ENDPOINT0_SIZE )
|
||||||
{
|
{
|
||||||
// DATA stage is complete
|
// DATA stage is complete
|
||||||
bool is_ok = true;
|
bool is_ok = true;
|
||||||
|
@ -172,8 +172,8 @@ void dcd_init(uint8_t rhport)
|
|||||||
|
|
||||||
//------------- user manual 11.13 usb device controller initialization -------------//
|
//------------- user manual 11.13 usb device controller initialization -------------//
|
||||||
// step 6 : set up control endpoint
|
// step 6 : set up control endpoint
|
||||||
set_ep_size(0, CFG_TUD_ENDOINT0_SIZE);
|
set_ep_size(0, CFG_TUD_ENDPOINT0_SIZE);
|
||||||
set_ep_size(1, CFG_TUD_ENDOINT0_SIZE);
|
set_ep_size(1, CFG_TUD_ENDPOINT0_SIZE);
|
||||||
|
|
||||||
bus_reset();
|
bus_reset();
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ static void bus_reset(uint8_t rhport)
|
|||||||
|
|
||||||
//------------- Set up Control Endpoints (0 OUT, 1 IN) -------------//
|
//------------- Set up Control Endpoints (0 OUT, 1 IN) -------------//
|
||||||
p_dcd->qhd[0].zero_length_termination = p_dcd->qhd[1].zero_length_termination = 1;
|
p_dcd->qhd[0].zero_length_termination = p_dcd->qhd[1].zero_length_termination = 1;
|
||||||
p_dcd->qhd[0].max_package_size = p_dcd->qhd[1].max_package_size = CFG_TUD_ENDOINT0_SIZE;
|
p_dcd->qhd[0].max_package_size = p_dcd->qhd[1].max_package_size = CFG_TUD_ENDPOINT0_SIZE;
|
||||||
p_dcd->qhd[0].qtd_overlay.next = p_dcd->qhd[1].qtd_overlay.next = QTD_NEXT_INVALID;
|
p_dcd->qhd[0].qtd_overlay.next = p_dcd->qhd[1].qtd_overlay.next = QTD_NEXT_INVALID;
|
||||||
|
|
||||||
p_dcd->qhd[0].int_on_setup = 1; // OUT only
|
p_dcd->qhd[0].int_on_setup = 1; // OUT only
|
||||||
|
Loading…
x
Reference in New Issue
Block a user