Skip to content

Commit 66c8452

Browse files
authored
Merge pull request #3345 from hathach/update-iso-alloc
make dcd_edpt_iso_alloc/activate as default API for ISO endpoint
2 parents 20c3644 + 1173502 commit 66c8452

File tree

41 files changed

+2536
-924
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2536
-924
lines changed

.circleci/config.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ jobs:
3232
BUILDSYSTEM_TOOLCHAIN+=("cmake arm-iar")
3333
fi
3434
35-
RESOURCE_LARGE='["nrf", "imxrt", "stm32f4", "stm32h7 stm32h7rs"]'
36-
3735
gen_build_entry() {
3836
local build_system="$1"
3937
local toolchain="$2"
@@ -61,21 +59,7 @@ jobs:
6159
FAMILY=$(echo $MATRIX_JSON | jq -r ".\"$toolchain\"")
6260
echo "FAMILY_${toolchain}=$FAMILY"
6361
64-
# FAMILY_LARGE = FAMILY - RESOURCE_LARGE
65-
# Separate large from medium+ resources
66-
FAMILY_LARGE=$(jq -n --argjson family "$FAMILY" --argjson resource "$RESOURCE_LARGE" '$family | map(select(IN($resource[])))')
67-
FAMILY=$(jq -n --argjson family "$FAMILY" --argjson resource "$RESOURCE_LARGE" '$family | map(select(IN($resource[]) | not))')
68-
69-
if [[ $toolchain == esp-idf || $toolchain == arm-iar ]]; then
70-
gen_build_entry "$build_system" "$toolchain" "$FAMILY" "large"
71-
else
72-
gen_build_entry "$build_system" "$toolchain" "$FAMILY" "medium+"
73-
74-
# add large resources if available
75-
if [ "$(echo $FAMILY_LARGE | jq 'length')" -gt 0 ]; then
76-
gen_build_entry "$build_system" "$toolchain" "$FAMILY_LARGE" "large"
77-
fi
78-
fi
62+
gen_build_entry "$build_system" "$toolchain" "$FAMILY" "large"
7963
done
8064
8165
- continuation/continue:

.circleci/config2.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ commands:
104104

105105
- run:
106106
name: Build
107+
no_output_timeout: 20m
107108
command: |
108109
if [ << parameters.toolchain >> == esp-idf ]; then
109110
docker run --rm -v $PWD:/project -w /project espressif/idf:v5.3.2 python tools/build.py << parameters.family >>
@@ -127,7 +128,7 @@ jobs:
127128
parameters:
128129
resource_class:
129130
type: string
130-
default: medium+
131+
default: large
131132
build-system:
132133
type: string
133134
toolchain:

docs/porting.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,22 @@ Also make sure to enable endpoint specific interrupts.
173173
``dcd_edpt_close()``
174174
""""""""""""""""""""
175175

176+
.. warning::
177+
This function is deprecated, ISO transfer should implement dcd_edpt_iso_alloc() and dcd_edpt_iso_activate() instead.
178+
176179
Close an endpoint. his function is used for implementing alternate settings.
177180

178181
After calling this, the device should not respond to any packets directed towards this endpoint. When called, this function must abort any transfers in progress through this endpoint, before returning.
179182

180183
Implementation is optional. Must be called from the USB task. Interrupts could be disabled or enabled during the call.
181184

185+
``dcd_edpt_iso_alloc() / dcd_edpt_iso_activate()``
186+
""""""""""""""""""""""""""""""""""""""""""""""""""
187+
188+
dcd_edpt_iso_alloc() is used to allocate largest buffer (for all alternative interfaces) for ISO endpoints when device is enumerated. This allows DCD to allocate necessary resources for ISO endpoints in the future.
189+
190+
dcd_edpt_iso_activate() is used to activate or deactivate ISO endpoint when alternate setting is set with active max packet size.
191+
182192
``dcd_edpt_xfer()``
183193
"""""""""""""""""""
184194

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
mcu:CH32V103
22
mcu:CH32V20X
3-
mcu:MCXA15
43
mcu:MSP430x5xx
54
mcu:NUC121
65
mcu:SAMD11

examples/device/video_capture_2ch/skip.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ mcu:CH32V103
66
mcu:CH32V20X
77
mcu:CH32V307
88
mcu:STM32L0
9-
mcu:MCXA15
109
family:espressif
1110
board:curiosity_nano
1211
board:kuiic

hw/bsp/family_support.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ function(family_configure_common TARGET RTOS)
264264
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
265265
SKIP_LINTING ON # need cmake 4.2
266266
)
267+
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
268+
set_target_properties(${BOARD_TARGET} PROPERTIES COMPILE_OPTIONS -w)
269+
endif ()
267270
endif ()
268271
target_link_libraries(${TARGET} PUBLIC ${BOARD_TARGET})
269272
endif ()

hw/bsp/mcx/boards/frdm_mcxa153/board.cmake

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ function(update_board TARGET)
1414
BOARD_TUD_MAX_SPEED=OPT_MODE_FULL_SPEED
1515
CFG_EXAMPLE_VIDEO_READONLY
1616
)
17-
target_sources(${TARGET} PUBLIC
18-
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/clock_config.c
19-
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/pin_mux.c
17+
target_sources(${TARGET} PRIVATE
18+
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/board/clock_config.c
19+
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/board/pin_mux.c
20+
)
21+
target_include_directories(${TARGET} PUBLIC
22+
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/board
2023
)
2124
endfunction()

hw/bsp/mcx/boards/frdm_mcxa153/board.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ CPU_CORE = cortex-m33-nodsp-nofp
66
CFLAGS += \
77
-DCPU_MCXA153VLH \
88
-DCFG_TUSB_MCU=OPT_MCU_MCXA15 \
9+
-DCFG_EXAMPLE_VIDEO_READONLY
10+
11+
SRC_C += \
12+
${BOARD_PATH}/board/clock_config.c \
13+
${BOARD_PATH}/board/pin_mux.c
14+
15+
INC += \
16+
$(TOP)/$(BOARD_PATH)/board
917

1018
JLINK_DEVICE = MCXA153
1119
PYOCD_TARGET = MCXA153

0 commit comments

Comments
 (0)