Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
035d1612
Commit
035d1612
authored
Feb 08, 2021
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ports: Update to build with new tinyusb.
Signed-off-by:
Damien George
<
damien@micropython.org
>
parent
9b7d8b87
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
14 deletions
+13
-14
ports/mimxrt/board_init.c
ports/mimxrt/board_init.c
+2
-2
ports/mimxrt/tusb_config.h
ports/mimxrt/tusb_config.h
+0
-1
ports/mimxrt/tusb_port.c
ports/mimxrt/tusb_port.c
+2
-2
ports/nrf/drivers/usb/usb_descriptors.c
ports/nrf/drivers/usb/usb_descriptors.c
+2
-2
ports/samd/tusb_port.c
ports/samd/tusb_port.c
+7
-7
No files found.
ports/mimxrt/board_init.c
View file @
035d1612
...
...
@@ -90,11 +90,11 @@ void SysTick_Handler(void) {
}
void
USB_OTG1_IRQHandler
(
void
)
{
tud_i
s
r
(
0
);
tud_i
nt_handle
r
(
0
);
tud_task
();
}
void
USB_OTG2_IRQHandler
(
void
)
{
tud_i
s
r
(
1
);
tud_i
nt_handle
r
(
1
);
tud_task
();
}
ports/mimxrt/tusb_config.h
View file @
035d1612
...
...
@@ -32,6 +32,5 @@
#define CFG_TUD_CDC (1)
#define CFG_TUD_CDC_RX_BUFSIZE (512)
#define CFG_TUD_CDC_TX_BUFSIZE (512)
#define CFG_TUD_CDC_EPSIZE (512)
#endif // MICROPY_INCLUDED_MIMXRT_TUSB_CONFIG_H
ports/mimxrt/tusb_port.c
View file @
035d1612
...
...
@@ -67,7 +67,7 @@ static const tusb_desc_device_t usbd_desc_device = {
};
static
const
uint8_t
usbd_desc_cfg
[
USBD_DESC_LEN
]
=
{
TUD_CONFIG_DESCRIPTOR
(
USBD_ITF_MAX
,
USBD_STR_0
,
USBD_DESC_LEN
,
TUD_CONFIG_DESCRIPTOR
(
1
,
USBD_ITF_MAX
,
USBD_STR_0
,
USBD_DESC_LEN
,
TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP
,
USBD_MAX_POWER_MA
),
TUD_CDC_DESCRIPTOR
(
USBD_ITF_CDC
,
USBD_STR_CDC
,
USBD_CDC_EP_CMD
,
...
...
@@ -90,7 +90,7 @@ const uint8_t *tud_descriptor_configuration_cb(uint8_t index) {
return
usbd_desc_cfg
;
}
const
uint16_t
*
tud_descriptor_string_cb
(
uint8_t
index
)
{
const
uint16_t
*
tud_descriptor_string_cb
(
uint8_t
index
,
uint16_t
langid
)
{
#define DESC_STR_MAX (20)
static
uint16_t
desc_str
[
DESC_STR_MAX
];
...
...
ports/nrf/drivers/usb/usb_descriptors.c
View file @
035d1612
...
...
@@ -67,7 +67,7 @@ static const tusb_desc_device_t usbd_desc_device = {
};
static
const
uint8_t
usbd_desc_cfg
[
USBD_DESC_LEN
]
=
{
TUD_CONFIG_DESCRIPTOR
(
USBD_ITF_MAX
,
USBD_STR_0
,
USBD_DESC_LEN
,
TUD_CONFIG_DESCRIPTOR
(
1
,
USBD_ITF_MAX
,
USBD_STR_0
,
USBD_DESC_LEN
,
TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP
,
USBD_MAX_POWER_MA
),
TUD_CDC_DESCRIPTOR
(
USBD_ITF_CDC
,
USBD_STR_CDC
,
USBD_CDC_EP_CMD
,
...
...
@@ -90,7 +90,7 @@ const uint8_t *tud_descriptor_configuration_cb(uint8_t index) {
return
usbd_desc_cfg
;
}
const
uint16_t
*
tud_descriptor_string_cb
(
uint8_t
index
)
{
const
uint16_t
*
tud_descriptor_string_cb
(
uint8_t
index
,
uint16_t
langid
)
{
#define DESC_STR_MAX (20)
static
uint16_t
desc_str
[
DESC_STR_MAX
];
...
...
ports/samd/tusb_port.c
View file @
035d1612
...
...
@@ -68,7 +68,7 @@ static const tusb_desc_device_t usbd_desc_device = {
};
static
const
uint8_t
usbd_desc_cfg
[
USBD_DESC_LEN
]
=
{
TUD_CONFIG_DESCRIPTOR
(
USBD_ITF_MAX
,
USBD_STR_0
,
USBD_DESC_LEN
,
TUD_CONFIG_DESCRIPTOR
(
1
,
USBD_ITF_MAX
,
USBD_STR_0
,
USBD_DESC_LEN
,
TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP
,
USBD_MAX_POWER_MA
),
TUD_CDC_DESCRIPTOR
(
USBD_ITF_CDC
,
USBD_STR_CDC
,
USBD_CDC_EP_CMD
,
...
...
@@ -91,7 +91,7 @@ const uint8_t *tud_descriptor_configuration_cb(uint8_t index) {
return
usbd_desc_cfg
;
}
const
uint16_t
*
tud_descriptor_string_cb
(
uint8_t
index
)
{
const
uint16_t
*
tud_descriptor_string_cb
(
uint8_t
index
,
uint16_t
langid
)
{
#define DESC_STR_MAX (20)
static
uint16_t
desc_str
[
DESC_STR_MAX
];
...
...
@@ -118,29 +118,29 @@ const uint16_t *tud_descriptor_string_cb(uint8_t index) {
#if defined(MCU_SAMD21)
void
USB_Handler_wrapper
(
void
)
{
USB_Handler
(
);
tud_int_handler
(
0
);
tud_task
();
}
#elif defined(MCU_SAMD51)
void
USB_0_Handler_wrapper
(
void
)
{
USB_0_Handler
(
);
tud_int_handler
(
0
);
tud_task
();
}
void
USB_1_Handler_wrapper
(
void
)
{
USB_1_Handler
(
);
tud_int_handler
(
0
);
tud_task
();
}
void
USB_2_Handler_wrapper
(
void
)
{
USB_2_Handler
(
);
tud_int_handler
(
0
);
tud_task
();
}
void
USB_3_Handler_wrapper
(
void
)
{
USB_3_Handler
(
);
tud_int_handler
(
0
);
tud_task
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment