Skip to content

Commit 5f51981

Browse files
authored
Merge pull request #2767 from hathach/minor-update
Minor update
2 parents ca3925a + 0541598 commit 5f51981

File tree

25 files changed

+208
-173
lines changed

25 files changed

+208
-173
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
build-system: 'cmake'
6767
toolchain: ${{ matrix.toolchain }}
6868
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].family) }}
69-
one-per-family: ${{ github.event_name != 'pull_request' }}
69+
one-per-family: ${{ github.event_name == 'push' }}
7070

7171
# ---------------------------------------
7272
# Build CMake arm-gcc
@@ -103,12 +103,13 @@ jobs:
103103
build-system: 'make'
104104
toolchain: ${{ matrix.toolchain }}
105105
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].family) }}
106-
one-per-family: ${{ github.event_name != 'pull_request' }}
106+
one-per-family: ${{ github.event_name == 'push' }}
107107

108108
# ---------------------------------------
109109
# Build Make on Windows/MacOS
110110
# ---------------------------------------
111111
make-os:
112+
if: github.event_name == 'pull_request'
112113
uses: ./.github/workflows/build_util.yml
113114
strategy:
114115
fail-fast: false

README.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ Following CPUs are supported, check out `Supported Devices`_ for comprehensive l
109109
+==============+============================================================+
110110
| Allwinner | F1C100s/F1C200s |
111111
+--------------+------------------------------------------------------------+
112-
| Analog | MAX3421E (usb host shield) |
112+
| Analog | max32: 650, 666, 690. max78002 |
113+
| | |
114+
| | max3421e (host) |
113115
+--------------+------------------------------------------------------------+
114116
| Brigetek | FT90x |
115117
+--------------+------------------------------------------------------------+

docs/reference/supported.rst

Lines changed: 136 additions & 141 deletions
Large diffs are not rendered by default.

examples/device/cdc_dual_ports/src/usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ enum
109109
#define EPNUM_CDC_1_OUT 0x05
110110
#define EPNUM_CDC_1_IN 0x84
111111

112-
#elif defined(TUD_ENDPOINT_EXCLUSIVE_NUMBER)
112+
#elif defined(TUD_ENDPOINT_ONE_DIRECTION_ONLY)
113113
// MCUs that don't support a same endpoint number with different direction IN and OUT defined in tusb_mcu.h
114114
// e.g EP1 OUT & EP1 IN cannot exist together
115115
#define EPNUM_CDC_0_NOTIF 0x81

examples/device/cdc_msc/src/usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ enum {
103103
#define EPNUM_MSC_OUT 0x05
104104
#define EPNUM_MSC_IN 0x84
105105

106-
#elif defined(TUD_ENDPOINT_EXCLUSIVE_NUMBER)
106+
#elif defined(TUD_ENDPOINT_ONE_DIRECTION_ONLY)
107107
// MCUs that don't support a same endpoint number with different direction IN and OUT defined in tusb_mcu.h
108108
// e.g EP1 OUT & EP1 IN cannot exist together
109109
#define EPNUM_CDC_NOTIF 0x81

examples/device/cdc_msc_freertos/src/usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ enum {
103103
#define EPNUM_MSC_OUT 0x05
104104
#define EPNUM_MSC_IN 0x84
105105

106-
#elif defined(TUD_ENDPOINT_EXCLUSIVE_NUMBER)
106+
#elif defined(TUD_ENDPOINT_ONE_DIRECTION_ONLY)
107107
// MCUs that don't support a same endpoint number with different direction IN and OUT defined in tusb_mcu.h
108108
// e.g EP1 OUT & EP1 IN cannot exist together
109109
#define EPNUM_CDC_NOTIF 0x81

examples/device/cdc_uac2/src/usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ uint8_t const * tud_descriptor_device_cb(void)
9797
#define EPNUM_CDC_OUT 0x02
9898
#define EPNUM_CDC_IN 0x82
9999

100-
#elif defined(TUD_ENDPOINT_EXCLUSIVE_NUMBER)
100+
#elif defined(TUD_ENDPOINT_ONE_DIRECTION_ONLY)
101101
// MCUs that don't support a same endpoint number with different direction IN and OUT defined in tusb_mcu.h
102102
// e.g EP1 OUT & EP1 IN cannot exist together
103103
#define EPNUM_AUDIO_IN 0x01

examples/device/dynamic_configuration/src/usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ enum
132132
#define EPNUM_1_MSC_OUT 0x02
133133
#define EPNUM_1_MSC_IN 0x82
134134

135-
#elif defined(TUD_ENDPOINT_EXCLUSIVE_NUMBER)
135+
#elif defined(TUD_ENDPOINT_ONE_DIRECTION_ONLY)
136136
// MCUs that don't support a same endpoint number with different direction IN and OUT defined in tusb_mcu.h
137137
// e.g EP1 OUT & EP1 IN cannot exist together
138138
#define EPNUM_0_CDC_NOTIF 0x81

examples/device/midi_test/src/usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ enum
9393
#define EPNUM_MIDI_OUT 0x02
9494
#define EPNUM_MIDI_IN 0x81
9595

96-
#elif defined(TUD_ENDPOINT_EXCLUSIVE_NUMBER)
96+
#elif defined(TUD_ENDPOINT_ONE_DIRECTION_ONLY)
9797
// MCUs that don't support a same endpoint number with different direction IN and OUT defined in tusb_mcu.h
9898
// e.g EP1 OUT & EP1 IN cannot exist together
9999
#define EPNUM_MIDI_OUT 0x01

examples/device/msc_dual_lun/src/usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ enum
9191
#define EPNUM_MSC_OUT 0x02
9292
#define EPNUM_MSC_IN 0x81
9393

94-
#elif defined(TUD_ENDPOINT_EXCLUSIVE_NUMBER)
94+
#elif defined(TUD_ENDPOINT_ONE_DIRECTION_ONLY)
9595
// MCUs that don't support a same endpoint number with different direction IN and OUT defined in tusb_mcu.h
9696
// e.g EP1 OUT & EP1 IN cannot exist together
9797
#define EPNUM_MSC_OUT 0x01

examples/device/net_lwip_webserver/src/usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ uint8_t const * tud_descriptor_device_cb(void)
120120
#define EPNUM_NET_OUT 0x02
121121
#define EPNUM_NET_IN 0x81
122122

123-
#elif defined(TUD_ENDPOINT_EXCLUSIVE_NUMBER)
123+
#elif defined(TUD_ENDPOINT_ONE_DIRECTION_ONLY)
124124
// MCUs that don't support a same endpoint number with different direction IN and OUT defined in tusb_mcu.h
125125
// e.g EP1 OUT & EP1 IN cannot exist together
126126
#define EPNUM_NET_NOTIF 0x81

examples/device/uac2_headset/src/usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ uint8_t const * tud_descriptor_device_cb(void)
9797
#define EPNUM_AUDIO_OUT 0x08
9898
#define EPNUM_AUDIO_INT 0x01
9999

100-
#elif defined(TUD_ENDPOINT_EXCLUSIVE_NUMBER)
100+
#elif defined(TUD_ENDPOINT_ONE_DIRECTION_ONLY)
101101
// MCUs that don't support a same endpoint number with different direction IN and OUT defined in tusb_mcu.h
102102
// e.g EP1 OUT & EP1 IN cannot exist together
103103
#define EPNUM_AUDIO_IN 0x01

examples/device/uac2_speaker_fb/src/usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ uint8_t const * tud_hid_descriptor_report_cb(uint8_t itf)
131131
#define EPNUM_AUDIO_OUT 0x08
132132
#define EPNUM_DEBUG 0x01
133133

134-
#elif defined(TUD_ENDPOINT_EXCLUSIVE_NUMBER)
134+
#elif defined(TUD_ENDPOINT_ONE_DIRECTION_ONLY)
135135
// MCUs that don't support a same endpoint number with different direction IN and OUT defined in tusb_mcu.h
136136
// e.g EP1 OUT & EP1 IN cannot exist together
137137
#define EPNUM_AUDIO_FB 0x01

examples/device/video_capture/src/tusb_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
#define CFG_TUD_VIDEO_STREAMING_EP_BUFSIZE 256
107107

108108
// use bulk endpoint for streaming interface
109-
#define CFG_TUD_VIDEO_STREAMING_BULK 1
109+
#define CFG_TUD_VIDEO_STREAMING_BULK 0
110110

111111
//#define CFG_EXAMPLE_VIDEO_READONLY
112112
//#define CFG_EXAMPLE_VIDEO_DISABLE_MJPEG

examples/device/video_capture/src/usb_descriptors.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ enum {
118118
#elif TU_CHECK_MCU(OPT_MCU_NRF5X)
119119
// nRF5x ISO can only be endpoint 8
120120
#define EPNUM_VIDEO_IN (CFG_TUD_VIDEO_STREAMING_BULK ? 0x81 : 0x88)
121+
#elif TU_CHECK_MCU(OPT_MCU_MAX32650, OPT_MCU_MAX32666, OPT_MCU_MAX32690, OPT_MCU_MAX78002)
122+
#define EPNUM_VIDEO_IN 0x81
121123
#else
122124
#define EPNUM_VIDEO_IN 0x81
123125
#endif

examples/device/webusb_serial/src/usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ enum
104104
#define EPNUM_VENDOR_OUT 0x05
105105
#define EPNUM_VENDOR_IN 0x84
106106

107-
#elif defined(TUD_ENDPOINT_EXCLUSIVE_NUMBER)
107+
#elif defined(TUD_ENDPOINT_ONE_DIRECTION_ONLY)
108108
// MCUs that don't support a same endpoint number with different direction IN and OUT defined in tusb_mcu.h
109109
// e.g EP1 OUT & EP1 IN cannot exist together
110110
#define EPNUM_CDC_NOTIF 0x81

src/common/tusb_mcu.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,21 +138,21 @@
138138

139139
#elif TU_CHECK_MCU(OPT_MCU_SAMG)
140140
#define TUP_DCD_ENDPOINT_MAX 6
141-
#define TUD_ENDPOINT_EXCLUSIVE_NUMBER
141+
#define TUD_ENDPOINT_ONE_DIRECTION_ONLY
142142

143143
#elif TU_CHECK_MCU(OPT_MCU_SAMX7X)
144144
#define TUP_DCD_ENDPOINT_MAX 10
145145
#define TUP_RHPORT_HIGHSPEED 1
146-
#define TUD_ENDPOINT_EXCLUSIVE_NUMBER
146+
#define TUD_ENDPOINT_ONE_DIRECTION_ONLY
147147

148148
#elif TU_CHECK_MCU(OPT_MCU_PIC32MZ)
149149
#define TUP_DCD_ENDPOINT_MAX 8
150-
#define TUD_ENDPOINT_EXCLUSIVE_NUMBER
150+
#define TUD_ENDPOINT_ONE_DIRECTION_ONLY
151151

152152
#elif TU_CHECK_MCU(OPT_MCU_PIC32MX, OPT_MCU_PIC32MM, OPT_MCU_PIC32MK) || \
153153
TU_CHECK_MCU(OPT_MCU_PIC24, OPT_MCU_DSPIC33)
154154
#define TUP_DCD_ENDPOINT_MAX 16
155-
#define TUD_ENDPOINT_EXCLUSIVE_NUMBER
155+
#define TUD_ENDPOINT_ONE_DIRECTION_ONLY
156156

157157
//--------------------------------------------------------------------+
158158
// ST
@@ -299,7 +299,7 @@
299299
#elif TU_CHECK_MCU(OPT_MCU_CXD56)
300300
#define TUP_DCD_ENDPOINT_MAX 7
301301
#define TUP_RHPORT_HIGHSPEED 1
302-
#define TUD_ENDPOINT_EXCLUSIVE_NUMBER
302+
#define TUD_ENDPOINT_ONE_DIRECTION_ONLY
303303

304304
//--------------------------------------------------------------------+
305305
// TI
@@ -400,12 +400,12 @@
400400
#elif TU_CHECK_MCU(OPT_MCU_FT90X)
401401
#define TUP_DCD_ENDPOINT_MAX 8
402402
#define TUP_RHPORT_HIGHSPEED 1
403-
#define TUD_ENDPOINT_EXCLUSIVE_NUMBER
403+
#define TUD_ENDPOINT_ONE_DIRECTION_ONLY
404404

405405
#elif TU_CHECK_MCU(OPT_MCU_FT93X)
406406
#define TUP_DCD_ENDPOINT_MAX 16
407407
#define TUP_RHPORT_HIGHSPEED 1
408-
#define TUD_ENDPOINT_EXCLUSIVE_NUMBER
408+
#define TUD_ENDPOINT_ONE_DIRECTION_ONLY
409409

410410
//--------------------------------------------------------------------+
411411
// Allwinner
@@ -480,7 +480,7 @@
480480
#define TUP_USBIP_MUSB_ADI
481481
#define TUP_DCD_ENDPOINT_MAX 12
482482
#define TUP_RHPORT_HIGHSPEED 1
483-
#define TUD_ENDPOINT_EXCLUSIVE_NUMBER
483+
#define TUD_ENDPOINT_ONE_DIRECTION_ONLY
484484

485485
#endif
486486

src/device/dcd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ bool dcd_edpt_iso_activate(uint8_t rhport, tusb_desc_endpoint_t const * desc_ep)
181181

182182
#else
183183
// Close an endpoint.
184-
void dcd_edpt_close (uint8_t rhport, uint8_t ep_addr) TU_ATTR_WEAK;
184+
void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr);
185185

186186
#endif
187187

src/portable/microchip/samg/dcd_samg.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,11 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * ep_desc)
277277
return true;
278278
}
279279

280+
void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr) {
281+
(void) rhport; (void) ep_addr;
282+
// TODO implement dcd_edpt_close()
283+
}
284+
280285
void dcd_edpt_close_all (uint8_t rhport)
281286
{
282287
(void) rhport;

src/portable/nxp/lpc17_40/dcd_lpc17_40.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,11 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc)
335335
return true;
336336
}
337337

338+
void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr) {
339+
(void) rhport; (void) ep_addr;
340+
// TODO implement dcd_edpt_close()
341+
}
342+
338343
void dcd_edpt_close_all (uint8_t rhport)
339344
{
340345
(void) rhport;

src/portable/template/dcd_template.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,22 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * ep_desc)
102102
return false;
103103
}
104104

105+
// Allocate packet buffer used by ISO endpoints
106+
// Some MCU need manual packet buffer allocation, we allocate the largest size to avoid clustering
107+
bool dcd_edpt_iso_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet_size) {
108+
(void) rhport;
109+
(void) ep_addr;
110+
(void) largest_packet_size;
111+
return false;
112+
}
113+
114+
// Configure and enable an ISO endpoint according to descriptor
115+
bool dcd_edpt_iso_activate(uint8_t rhport, tusb_desc_endpoint_t const * desc_ep) {
116+
(void) rhport;
117+
(void) desc_ep;
118+
return false;
119+
}
120+
105121
void dcd_edpt_close_all (uint8_t rhport)
106122
{
107123
(void) rhport;

src/portable/ti/msp430x5xx/dcd_msp430x5xx.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
332332
return true;
333333
}
334334

335+
void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr) {
336+
(void) rhport; (void) ep_addr;
337+
// TODO implement dcd_edpt_close()
338+
}
339+
335340
void dcd_edpt_close_all (uint8_t rhport)
336341
{
337342
(void) rhport;

src/portable/valentyusb/eptri/dcd_eptri.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,11 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc)
436436
return true;
437437
}
438438

439+
void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr) {
440+
(void) rhport; (void) ep_addr;
441+
// TODO implement dcd_edpt_close()
442+
}
443+
439444
void dcd_edpt_close_all (uint8_t rhport)
440445
{
441446
(void) rhport;

test/hil/hil_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,11 @@ def main():
436436
else:
437437
config_boards = [e for e in config['boards'] if e['name'] in boards]
438438

439-
err_count_list = 0
439+
err_count_list = []
440440
with Pool(processes=os.cpu_count()) as pool:
441441
err_count_list = pool.map(test_board, config_boards)
442-
443-
sys.exit(sum(err_count_list))
442+
err_count = sum(err_count_list)
443+
sys.exit(err_count)
444444

445445

446446
if __name__ == '__main__':

test/hil/rpi.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@
6161
],
6262
"boards-skip": [
6363
{
64-
"name": "metro_m7_1011",
65-
"uid": "9CE8715DD71137363E00005002004200",
64+
"name": "mimxrt1015_evk",
65+
"uid": "DC28F865D2111D228D00B0543A70463C",
6666
"flasher": "jlink",
67-
"flasher_sn": "000611000000",
68-
"flasher_args": "-device MIMXRT1011xxx5A",
69-
"comment": "not running reliably in bulk with other boards, probably power, flashing etc .."
67+
"flasher_sn": "000726284213",
68+
"flasher_args": "-device MIMXRT1015DAF5A"
7069
},
7170
{
7271
"name": "nanoch32v203",

0 commit comments

Comments
 (0)